本篇文章给大家谈谈ubuntu配置怎么保存,以及ubuntu配置文件修改完怎么保存对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
- 1、怎么配置ubuntu的网络配置
- 2、ubuntu 直接在启动时,(不要和我说vi,进不了系统)修改grub修改后怎么保存?
- 3、ubuntu编辑网络配置文件后如何保存?
- 4、ubuntu中如何保存alsamixer设置
- 5、如何在ubuntu保存终端配置环境
- 6、ubuntu编辑网络配置文件后如何保存?
1、怎么配置ubuntu的网络配置
方法一.使用图行界面设置,这个最简单。IP,子网掩码,网关,DNS都可以轻松设置。永久保存。
方法二,采用命令方式,临时修改网卡IP和子网掩码,重启网络后会丢失。$sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0
查看网关,命令$route -n
修改网关$sudo route add default gw 192.168.0.1
查看DNS,使用nm-tool命令$ns-tool
方法三,修改网卡的配置文件,这个是最主要的方式,可以永久保存。
注意不是/etc/resolv.conf,而是/etc/network/interfaces文件。
输入命令$sudo nano /etc/network/interfaces
输入:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
Ctrl+x保存退出
输入命令$sudo nano /etc/resolvconf/resolv.conf.d/base
修改DNS
2、ubuntu 直接在启动时,(不要和我说vi,进不了系统)修改grub修改后怎么保存?
此时不能保存,只能ctrl+x或F10运行,无误引导启动能进入系统后,再用软件编辑修改相关配置文件,保存。
3、ubuntu编辑网络配置文件后如何保存?
Ubuntu 的网络配置文件主要有以下几个:IP地址配置文件、主机名称配置文件、DNS配置文件。
IP地址配置文件: /etc/network/interfaces
打开后里面可设置DHCP或手动设置静态ip。前面auto eth0,让网卡开机自动挂载.
1. 以DHCP方式配置网卡
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp
用下面的命令使网络设置生效:
sudo /etc/init.d/networking restart
也可以在命令行下直接输入下面的命令来获取地址
sudo dhclient eth0
2. 为网卡配置静态IP地址
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:
sudo /etc/init.d/networking restart
3. 设定第二个IP地址(虚拟IP地址)
编辑文件/etc/network/interfaces: sudo vi /etc/network/interfaces
在该文件中添加如下的行:
auto eth0:1
iface eth0:1 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
根据实际情况填上所有诸如address,netmask,network,broadcast和gateways等信息.
用下面的命令使网络设置生效:
sudo /etc/init.d/networking restart
主机名称配置文件(/bin/hostname)
使用下面的命令来查看当前主机的主机名称:
sudo /bin/hostname
使用下面的命令来设置当前主机的主机名称:
sudo /bin/hostname newname
系统启动时,它会从/etc/hostname来读取主机的名称.
DNS配置文件
首先,可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.
要访问DNS 服务器来进行查询,需要设置/etc/resolv.conf文件.
sudo vi /etc/resolv.conf
nameserver 202.96.128.68
nameserver 61.144.56.101
nameserver 192.168.8.220
/重新设置网络,以启用新设置
sudo /etc/init.d/networking restart
OK。
Ubuntu 的网络配置文件主要有以下几个:IP地址配置文件、主机名称配置文件、DNS配置文件。
4、ubuntu中如何保存alsamixer设置
用纯的alsa来说都是有个关机有alsa-store,开机有alsa-restore的。不过ubuntu是用的pluseaudio应该会自动保存才对。。。你可以选择自己写脚本。。。反正也简单
5、如何在ubuntu保存终端配置环境
eclipse 和 netbeans 的安装就很简单了,从官方网站上下载 deb包,安装即可
6、ubuntu编辑网络配置文件后如何保存?
Ubuntu
的网络配置文件主要有以下几个:IP地址配置文件、主机名称配置文件、DNS配置文件。
IP地址配置文件:
/etc/network/interfaces
打开后里面可设置DHCP或手动设置静态ip。前面auto
eth0,让网卡开机自动挂载.
1.
以DHCP方式配置网卡
编辑文件/etc/network/interfaces:
sudo
vi
/etc/network/interfaces
并用下面的行来替换有关eth0的行:
#
The
primary
network
interface
-
use
DHCP
to
find
our
address
auto
eth0
iface
eth0
inet
dhcp
用下面的命令使网络设置生效:
sudo
/etc/init.d/networking
restart
也可以在命令行下直接输入下面的命令来获取地址
sudo
dhclient
eth0
2.
为网卡配置静态IP地址
编辑文件/etc/network/interfaces:
sudo
vi
/etc/network/interfaces
并用下面的行来替换有关eth0的行:#
The
primary
network
interface
auto
eth0
iface
eth0
inet
static
address
192.168.3.90
gateway
192.168.3.1
netmask
255.255.255.0
将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:
sudo
/etc/init.d/networking
restart
3.
设定第二个IP地址(虚拟IP地址)
编辑文件/etc/network/interfaces:
sudo
vi
/etc/network/interfaces
在该文件中添加如下的行:
auto
eth0:1
iface
eth0:1
inet
static
address
192.168.1.60
netmask
255.255.255.0
network
x.x.x.x
broadcast
x.x.x.x
gateway
x.x.x.x
根据实际情况填上所有诸如address,netmask,network,broadcast和gateways等信息.
用下面的命令使网络设置生效:
sudo
/etc/init.d/networking
restart
主机名称配置文件(/bin/hostname)
使用下面的命令来查看当前主机的主机名称:
sudo
/bin/hostname
使用下面的命令来设置当前主机的主机名称:
sudo
/bin/hostname
newname
系统启动时,它会从/etc/hostname来读取主机的名称.
DNS配置文件
首先,可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.
要访问DNS
服务器来进行查询,需要设置/etc/resolv.conf文件.
sudo
vi
/etc/resolv.conf
nameserver
202.96.128.68
nameserver
61.144.56.101
nameserver
192.168.8.220
/重新设置网络,以启用新设置
sudo
/etc/init.d/networking
restart
OK。
Ubuntu
的网络配置文件主要有以下几个:IP地址配置文件、主机名称配置文件、DNS配置文件。
ubuntu配置怎么保存的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于ubuntu配置文件修改完怎么保存、ubuntu配置怎么保存的信息别忘了在本站进行查找喔。