linux网络设置
来源:互联网 发布:福建广电网络集团招标 编辑:程序博客网 时间:2024/06/16 22:09
1.查看ip地址
ifconfig(已经过时)ip addr show
2.指定ip地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0HWADDR=00:0C:29:8E:0B:00TYPE=EthernetUUID=f23f083d-89af-4951-a33d-496d4534beb1ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=192.168.111.111 #ipNETMASK=255.255.255.0 #子网掩码GATEWAY=192.168.111.2 #网关
3.配置DNS解析
vim /etc/resolv.conf
options timeout:2 attempts:3 rotate single-request-reopen; generated by /usr/sbin/dhclient-scriptnameserver 100.100.2.138 #DNS地址nameserver 100.100.2.136 #DNS地址search localdomain
4.设置主机名称
vi /etc/sysconfig/network
设置:
HOSTNAME=主机名
5.设置域名映射
vi /ect/hosts
添加域名映射
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
6.重启服务
service network restart
7.测试网络
ping ip地址
如
ping www.baidu.com
阅读全文
0 0
- linux 网络设置
- linux中的网络设置
- Linux设置网络文件系统
- VM+linux网络设置
- linux adsl 网络设置
- Linux 设置网络连接
- linux 下网络设置
- [入门]Linux网络设置
- linux网络设置命令
- linux系统网络设置
- 虚拟机Linux网络设置
- linux 网络设置
- linux网络设置
- linux 网络设置
- Linux网络设置问题
- LINUX系统设置网络
- 《Linux 十》 网络设置
- [Linux]十,网络设置
- 替换按钮下的文字颜色
- 2017全球人工智能发展报告
- java的23种设计模式
- Nginx 配置全解析(一)
- HTML 调用 打印机打印 By jQuery.print.js
- linux网络设置
- 一种简单的底部导航fragmentTabhost
- quartz原理
- HTML表单input控件1
- AugularJs 用户信息的管理
- the file contains top level spacers. They will not be saved.Perhaps you forgot to create a layout
- js 路由 范围排序 修改数据
- Likecloud 吃吃吃
- android从webservice服务器下载图片