非root用户在每条命令前加 sudo
配置静态IP地址
vi /etc/network/interfaces
内容如下:
auto eth0 ##应该是启用第一块网卡的意思
ifconf eth0 inet static
address 192.168.0.2 ##IP地址
netmask 255.255.255.0 ##子网掩码
gateway 192.168.0.1 ##网关
配置DNS
vi /etc/resolv.conf
增加内容:
nameserver 61.177.7.1
配置网关
route add default gw 192.168.0.1
重新启动网络配置
/etc/init.d/networking restartUbuntu学习之root密码Ubuntu linux基础操作学习相关资讯 Ubuntu
- 如果没有Ubuntu,我们将去哪里? (02月04日)
- Libra—扁平化风格Ubuntu Unity主 (11/30/2014 08:21:04)
- 一盘棋:Ubuntu明明不赚钱为什么还 (08/19/2013 16:59:50)
| - 桌面/移动端 Ubuntu 将获重大 UI (09/29/2015 11:48:18)
- Ubuntu将消失 有人欢喜有人愁 (10/18/2013 11:43:45)
- 烧钱不断的Ubuntu——一个理想主义 (08/14/2013 07:36:21)
|
本文评论 查看全部评论 (0)