linux ubuntu apt-get更换源,安装桌面
2016-11-15 00:00
726 查看
linux ubuntu apt-get更换源
ubuntu 的默认源是美国的,所以下载起来特别慢,作为天朝用户,自然要更换为天朝的源了。
国内有很多源可用,有些大学和公司也在维护着一些源。网上有很多可用的,下面给出一种简单的方法。
用vi和gedit 打开 /etc/apt/sources.list 将其中的us.archive 全部替换为 cn.archive即可,这样,以后使用apt-get下载就会使用源自http://cn.archive.ubuntu.com 了。
使用vi编辑器的命令为(注意首先切换到root用户):
root@ubuntu :/#vi /etc/apt/sources.list
打开sources.list
在vi命令模式下(进入后即是命令行模式,按i后才可进入编辑模式,不过这里不需要编辑模式),输入
:%s/us.archive/cn.archive/g
替换完毕,输入
:wq!
保存退出。
命令中的符号解释:
:(冒号),表示后面是命令
%(百分号),表示修改缓冲区中的文件内容;也就是说如果不保存,源文件不会改变;所以之后要用:wq! 命令保存退出
s(字母s),表示替换
/us.archive/cn.archive,表示将文件中的us.archive 替换为cn.archive
/g(撇加字母g),表示替换所有内容
这样,就将apt-get的源更改为国内的源了。
下面必须重起下apt-get,命令
apt-get update
好了。
安装桌面
/etc/apt/reources.list.d
修改源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
1 (最简) 基于GNOME
sudo apt-get install --no-install-recommends ubuntu-gnome-desktop
or
sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install(这个更小)
2 基于Unity
sudo apt-get install --no-install-recommends ubuntu-desktop
3 Lubuntu or LXDE 桌面
sudo apt-get install --no-install-recommends lubuntu-desktop
or
sudo apt-get install lxde or sudo apt-get install lxde-core
ubuntu 的默认源是美国的,所以下载起来特别慢,作为天朝用户,自然要更换为天朝的源了。
国内有很多源可用,有些大学和公司也在维护着一些源。网上有很多可用的,下面给出一种简单的方法。
用vi和gedit 打开 /etc/apt/sources.list 将其中的us.archive 全部替换为 cn.archive即可,这样,以后使用apt-get下载就会使用源自http://cn.archive.ubuntu.com 了。
使用vi编辑器的命令为(注意首先切换到root用户):
root@ubuntu :/#vi /etc/apt/sources.list
打开sources.list
在vi命令模式下(进入后即是命令行模式,按i后才可进入编辑模式,不过这里不需要编辑模式),输入
:%s/us.archive/cn.archive/g
替换完毕,输入
:wq!
保存退出。
命令中的符号解释:
:(冒号),表示后面是命令
%(百分号),表示修改缓冲区中的文件内容;也就是说如果不保存,源文件不会改变;所以之后要用:wq! 命令保存退出
s(字母s),表示替换
/us.archive/cn.archive,表示将文件中的us.archive 替换为cn.archive
/g(撇加字母g),表示替换所有内容
这样,就将apt-get的源更改为国内的源了。
下面必须重起下apt-get,命令
apt-get update
好了。
安装桌面
/etc/apt/reources.list.d
修改源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
1 (最简) 基于GNOME
sudo apt-get install --no-install-recommends ubuntu-gnome-desktop
or
sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install(这个更小)
2 基于Unity
sudo apt-get install --no-install-recommends ubuntu-desktop
3 Lubuntu or LXDE 桌面
sudo apt-get install --no-install-recommends lubuntu-desktop
or
sudo apt-get install lxde or sudo apt-get install lxde-core
相关文章推荐
- Linux Ubuntu apt-get安装Java jdk
- 【linux】在ubuntu中使用apt-get安装oracle jdk6
- linux(ubuntu)安装软件出现You might want to run 'apt-get -f install' to correct these解决
- linux ubuntu apt-get 更换源
- Linux(Ubuntu)使用 sudo apt-get install 命令安装软件的目录在哪?(已解决)
- Linux Ubuntu apt-get安装mysql
- Linux 系统操作简记 -- 修改Ubuntu apt-get 与 pip更新源,提高安装速度
- Ubuntu14.04桌面版 apt-get 方式安装LNMP
- linux 安装 chromedriver (Ubuntu linaro 安装 chromium-chromedriver)sudo apt-get install chromium-chromedr
- Linux-----Ubuntu中apt-get安装源的设置
- Linux-----Ubuntu下apt-get安装软件包时依赖包版本过高
- apt-get依赖库版本过高问题的解决(如何处理libqt4-dev在ubuntu的安装问题)
- Ubuntu Linux系统下apt-get命令整理
- linux ubuntu apt-get
- Ubuntu Linux系统下Apt-get命令参数详解
- Ubuntu Linux系统下Apt-get命令参数详解
- Ubuntu Linux系统下apt-get命令详解
- Ubuntu Linux系统下Apt-get命令参数详解
- 关于ubuntu的apt-get和安装目录
- Ubuntu使用命令安装jdk失败的解决方案--sudo apt-get install sun-java6-jdk