配置apt-get源

时间:2024-04-10 17:23:31

说明:
Ubuntu默认安装下没有配置国内apt-get源、这样使用apt-get在线安装软件会很慢,下面教大家配置apt-get国内镜像源,在线安装SSH服务(最小话安装的Ubuntu默认没有安装SSH)

1、配置apt-get源

cp  /etc/apt/sources.list  /etc/apt/sources.listbak   #备份原有配置文件

nano  /etc/apt/sources.list   #编辑,添加以下代码:

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
       deb http://mirrors.163.com/ubuntu/ oneiric main restricted universe multiverse
       deb http://mirrors.163.com/ubuntu/ oneiric-security main restricted universe multiverse
       deb http://mirrors.163.com/ubuntu/ oneiric-updates main restricted universe multiverse
       deb http://mirrors.163.com/ubuntu/ oneiric-proposed main restricted universe multiverse
       deb http://mirrors.163.com/ubuntu/ oneiric-backports main restricted universe multiverse
       deb-src http://mirrors.163.com/ubuntu/ oneiric main restricted universe multiverse
       deb-src http://mirrors.163.com/ubuntu/ oneiric-security main restricted universe multiverse
       deb-src http://mirrors.163.com/ubuntu/ oneiric-updates main restricted universe multiverse
       deb-src http://mirrors.163.com/ubuntu/ oneiric-proposed main restricted universe multiverse
       deb-src http://mirrors.163.com/ubuntu/ oneiric-backports main restricted universe multiverse
       ctrl+o   #保存配置
       ctrl+x   #退出
       apt-get update     #更新系统
       apt-get upgrade   #更新软件包

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接

配置apt-get源

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接

2、安装SSH服务

     apt-get install ssh     #安装ssh服务


转载于:https://my.oschina.net/flylxl/blog/481065