在linux系统界面下设置IP地址是一件很容易的事。只需要通过一系列的命令指令来完成。但是,有些更新的系统已经提供了一个图形化工具来设置IP地址,让你轻松设置。
首先,你需要打开系统的图形化控制台,然后找到“网络”这一项,将其展开,进入你需要配置的选项,如果你是通过Cable网络,选择“ Wired”,如果是通过无线网络,则选择“Wireless”。
然后,点击“编辑”按钮,进入下一个界面,可以看到一个名为“IPV4”的选项,点击其右边的小三角形进入设置IP地址的界面,在“IP地址”处填写上你的IP地址,在“子网掩码”处填写上你的子网掩码,并点击“应用”和“确定”按钮即可。
上面来完成就是配置IP地址的图形化接口,你还可以通过命令行接口来设置IP地址。如果你使用的是CentOS,你可以打开终端例如terminal,输入以下指令进行设置:
ifconfigeth0192.168.1.10 netmask255.255.255.0

其中,eth0为网络设备的名称,192.168.1.10为要设置的IP地址,255.255.255.0为子网掩码,你可以根据不同的情况进行设置修改。
经过以上几步,你就可以在Linux系统界面下轻松地配置IP地址了。无论你选择哪种方式,IP地址的设置都是很重要的,它能够使网络连接更加安全可靠。最后,祝祝大家网络设置成功!
香港服务器首选树叶云,2H2G首月10元开通。树叶云(shuyeidc.com)提供简单好用,价格厚道的香港/美国云 服务器 和独立服务器。IDC+ISP+ICP资质。ARIN和APNIC会员。成熟技术团队15年行业经验。
Linux系统下如何设置ip及相关
首先,要取得root权限,su 输入root密码,如果已经是root权限,假定要设置的网卡是eth0,那么输入:
ifconfig eth0 x.x.x.x x.x.x.x 前四个x是IP地址,后四个X是子网掩码,如果有多个网卡,则设置eth1 等。
默认网关:
输入:route add default gateway X.X.X.X
DNS:编辑 /etc/ 编辑可以用VI。
输入:
nameserver: 202.99.166.4 (网通,具体输入你的DNS)
如何在linux5上配置IP?
进入超级终端然后进入sbinifconfig查看网络接口设备ifconfig (指定接口名称) 查看指定接口信息ifconfig -a查看所有网络接口信息设置IP地址格式如下:ifconfig 网络接口名称 ip地址 netmask 子网掩码如设置在接口以太网0(就是我们所用来接网线的口叫以太口)上面的命令:ifconfig eth0 192.168.1.100 netmask 255.255.255.0默认网关命令格式:route add default gw (网关地址)
Linux如何设置上网???
linux上网设置经典二法1、一种是linux共享局域网内的windows主机上网如果你的网卡linux能够识别的话在安装的时候会有网卡配置过程。 从列表中选择网络设备,一般为eth0,点击“编辑”,在打开的“编辑接口”对话框中,用户可以通过DHCP来配置网络,这样也可以,不过我更喜欢定制一个静态IP,所以去掉“使用DHCP进行配置”前面的选项,然后在下面输入你要定制的IP地址和子网掩码,确定后,在下面的网关和主要DNS里输入当前局域网上做为主机的计算机的IP地址。 这样装完以后就搞定。 如果你是装完后再安装的网卡的话,那可以在“系统设置”里选择“网络”,如果你的网卡安装成功的话会在下面的列表里看到你的网卡,同样设置DNS(和上面一样),然后再回到列表里,选中你的网卡,点上面的编辑,选中“当计算机启动时激活设备”,然后选择下面的“静态设置的IP地址”,在下面输入和上面同样的设置。 再重新启动就可以了。 2、另外一种就是用你的linux通过ADSL上网了在linux下就集成着一个ADSL拨号软件,打开终端,在里面输入#adsl-setup,然后进行设置:LOGIN NAMEEnter your Login Name (default root):(输入你的用户名)INTERFACEEnter the Ethernet interface connected to the ADSL modemFor Solaris, this is likely to be something like /dev/ Linux, it will be ethX, where X is a number.(default eth0):(选择网络设备)Do you want the link to come up on demand, or stay up continuously?If you want it to come up on demand, enter the idle time in secondsafter which the link should be you want the link tostay up permanently, enter no (two letters, lower-case.)NOTE: Demand-activated links do not interact well with dynamic may have some problems with demand-activated the demand value (default no):(选择是按需拨号,还是持续连接)DNSPlease enter the IP address of your ISPs primary DNS your ISP claims that the server will provide dynamic DNS addresses,enter server (all lower-case) you just press enter, I will assume you know what you aredoing and not modify your DNS the DNS information here:(选择DNS)PASSWORDPlease enter your Password:Please re-enter your Password:USERCTRLPlease enter yes (two letters, lower-case.) if you want to allownormal user to start or stop DSL connection (default yes):(是否允许普通用户启动、关闭)The firewall choices are:0 - NONE: This script will not set any firewall are responsible for ensuring the security of your are STRONGLY recommended to use some kind of firewall rules.1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LANChoose a type of firewall (0-2):(选择firewall的规则)Start this connection at boot timeDo you want to start this connection at boot time?Please enter no or yes (default no):(选择是否随机启动)** Summary of what you entered **Ethernet Interface:User name:Activate-on-demand:DNS addresses:Firewalling:User Control:Accept these settings and adjust configuration files (y/n)?(确认一下是否接受设置) 以上的设置在“系统设置”里 的“网络”里选择新建,建立一个xDSL连接,也可以实现。 设置完成了以后在网络里激活连接。 上面的ADSL连接就试过一次,由于我们是局域网,所以一直用的是共享上网,如果有什么错误不要骂我,还请指教!!
发表评论