1:设置ip
ubuntu的网络配置信息放在 /etc/network/interfaces 中,
如果配置动态获取ip,则在上述文件中加入以下内容:
auto eth0
iface eth0 inet dhcp
如果配置静态ip,则添加如下内容:
auto eth0
iface eth0 inet static
address 192.168.33.201
netmask 255.255.255.0
gateway 192.168.33.1
要是配置生效,需要重启网卡:
ifconfig eth0 down
ifconfig eth0 up
不是root,命令前面加sudo
2:修改DNS
sudo /etc/resolv.conf
3:修改文件夹权限
sudo chmod 777 /var/www
4:使用root登录 sudo su
退出 用exit
5:cd ~表示进入当前用户home文件夹
本文介绍了如何在Ubuntu系统中配置网络参数,包括设置IP地址为静态或动态获取、修改DNS服务器地址、调整文件夹权限等内容,并提供了具体的命令示例。
2万+

被折叠的 条评论
为什么被折叠?



