Ubuntu使用总结
Posted 八级地震
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu使用总结相关的知识,希望对你有一定的参考价值。
1、root密码随机生成,设置时,由普通用户登入后,使用命令修改:
sudo passwd
2、网络配置文件:/etc/network/interfaces
sshusr@CountryLib:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# The secondary network interface for local host access
auto eth1
iface eth1 inet static
address 192.168.56.2
network 255.255.255.0
sshusr@CountryLib:~$
# The secondary network interface for brige access
auto eth1
iface eth1 inet dhcp
sshusr@CountryLib:~$
需要选择宿主机使用的网卡
3、使root可以远程登录
默认Ubuntu禁止root帐号远程登录,启用方法:
/etc/ssh/sshd_config
注释掉:
PermitRootLogin without-password
并增加:
PermitRootLogin yes
如:
...
#PermitRootLogin without-password
PermitRootLogin yes
...
然后重启ssh服务:
service ssh restart
4、和CentOS在包管理上的使用差异:
a、yum install = apt-get install
b、yum search = apt-cache search
5、更新ubuntu的软件源为国内的服务器,此处为网易的::
sshusr@CountryLib:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
[sudo] password for sshusr:
sshusr@CountryLib:~$ sudo vi /etc/apt/sources.list(全部删除原来的,直接用下面的内容替换)
sshusr@CountryLib:~$ sudo apt-get update
源列表可以参考:http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
一些有用的软件包:
1、直接拖文件到xshell中就可以直接上传:
sudo apt-get install lrzsz
以上是关于Ubuntu使用总结的主要内容,如果未能解决你的问题,请参考以下文章