hd 表示ide设备(并口)
sd 表示scsi设备
sata 串口
设置IP地址
[root@biaozhi ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //设备名称
ONBOOT=yes //开机启动
BOOTPROTO=static //静态地址引导
IPADDR=192.168.6.80 //IP地址
NETMASK=255.255.255.0 //子网掩码
GATEWAY=192.168.6.1 //网关
DNS1=222.222.222.222 //DNS,域名解析
[root@biaozhi ~]# service network restart
注意:如果网卡配置有问题,按照如下步骤处理
1>.CentOS6.X网卡配置时,需要删除下面文件:rm -rf /etc/udev/rules.d/70-persistent-net.rules
2>.重启 reboot
3>.如果重启服务报错,那么添加一块与现有网卡相同类型的网卡即可!
4>.再次重新启动服务 service network restart
init 0 关机
等号左边大写等号右边小写
if congig 查看地址
nano /etc/sysconfig/network-scricpts/ifcfg-etch0
内部优先级100 外部0 dmz 50
访问:高-》低 nat
低-》高acl
nano /etc/selinux/config
当文件没有正常退出时,会产生临时文件造成二次打开失败。
selinux 必须重新启动系统
以点开头的文件叫隐藏文件、
rm 文件路径 产出文件
init 6 重启
service iptables stop 临时关闭防火墙
service iptables status(状态)查看防火墙状态
chkconfig iptables off 永久关闭防火期
echo "jing mao mao." > lshelp.txt 创建lshelp文件
cat lshelp.txt 显示
ls -l lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt显示长文件
ls -a
. anaconda-ks.cfg .bash_logout .bashrc install.log lshelp.txt .viminfo
.. .bash_history .bash_profile .cshrc install.log.syslog .tcshrc
显示隐藏文件
ls -lh lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt
显示文件大小
ls -ld /etc/
drwxr-xr-x. 107 root root 12288 3月 7 18:33 /etc/
显示目录属性
help 命令 内部 help
man ls | col -b > lshelp.txt
[root@loc ~]# echo "ni si l ." > lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
替换
echo "ni mei l ." >> lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
ni mei l .
添加
cat -n /etc/sysconfig/network-scripts/ifcfg-eth0
1
2
3
4
5
6
7
8
9
10
11
12 DEVICE=eth0
13 TYPE=Ethernet
14 #UUID=7e4f476a-1972-448c-984a-80049f51ef88
15 ONBOOT=yes
16 #NM_CONTROLLED=yes
17 BOOTPROTO=static
18 IPADDR=172.16.1.86
19 NETMASK=255.255.0.0
20 GATEWAY=172.16.0.1
21 DNS1=114.114.114.114
22
23
24
加n显示序列号
head 显示前十行
tail 显示后十行
head -4 /etc/init.d | tail -1 第四行
sd 表示scsi设备
sata 串口
设置IP地址
[root@biaozhi ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //设备名称
ONBOOT=yes //开机启动
BOOTPROTO=static //静态地址引导
IPADDR=192.168.6.80 //IP地址
NETMASK=255.255.255.0 //子网掩码
GATEWAY=192.168.6.1 //网关
DNS1=222.222.222.222 //DNS,域名解析
[root@biaozhi ~]# service network restart
注意:如果网卡配置有问题,按照如下步骤处理
1>.CentOS6.X网卡配置时,需要删除下面文件:rm -rf /etc/udev/rules.d/70-persistent-net.rules
2>.重启 reboot
3>.如果重启服务报错,那么添加一块与现有网卡相同类型的网卡即可!
4>.再次重新启动服务 service network restart
init 0 关机
等号左边大写等号右边小写
if congig 查看地址
nano /etc/sysconfig/network-scricpts/ifcfg-etch0
内部优先级100 外部0 dmz 50
访问:高-》低 nat
低-》高acl
nano /etc/selinux/config
当文件没有正常退出时,会产生临时文件造成二次打开失败。
selinux 必须重新启动系统
以点开头的文件叫隐藏文件、
rm 文件路径 产出文件
init 6 重启
service iptables stop 临时关闭防火墙
service iptables status(状态)查看防火墙状态
chkconfig iptables off 永久关闭防火期
echo "jing mao mao." > lshelp.txt 创建lshelp文件
cat lshelp.txt 显示
ls -l lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt显示长文件
ls -a
. anaconda-ks.cfg .bash_logout .bashrc install.log lshelp.txt .viminfo
.. .bash_history .bash_profile .cshrc install.log.syslog .tcshrc
显示隐藏文件
ls -lh lshelp.txt
-rw-r--r--. 1 root root 14 3月 7 18:38 lshelp.txt
显示文件大小
ls -ld /etc/
drwxr-xr-x. 107 root root 12288 3月 7 18:33 /etc/
显示目录属性
help 命令 内部 help
man ls | col -b > lshelp.txt
[root@loc ~]# echo "ni si l ." > lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
替换
echo "ni mei l ." >> lshelp.txt
[root@loc ~]# cat lshelp.txt
ni si l .
ni mei l .
添加
cat -n /etc/sysconfig/network-scripts/ifcfg-eth0
1
2
3
4
5
6
7
8
9
10
11
12 DEVICE=eth0
13 TYPE=Ethernet
14 #UUID=7e4f476a-1972-448c-984a-80049f51ef88
15 ONBOOT=yes
16 #NM_CONTROLLED=yes
17 BOOTPROTO=static
18 IPADDR=172.16.1.86
19 NETMASK=255.255.0.0
20 GATEWAY=172.16.0.1
21 DNS1=114.114.114.114
22
23
24
加n显示序列号
head 显示前十行
tail 显示后十行
head -4 /etc/init.d | tail -1 第四行