标签:连通性 centos 组成 restart term 登录 pow eve 接口
[root@localhost ~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
LISTEN 0 100 ::1:25 :::*
LISTEN 0 100 127.0.0.1:25 *:*
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
[root@localhost ~]# service network restart
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
ONBOOT=yes
[root@localhost ~]# systemctl restart network.service
[root@localhost ~]# yum -y install net-tools
[root@localhost ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.107 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6937:666e:92c9:c97d prefixlen 64 scopeid 0x20<link>
ether 08:00:27:52:04:00 txqueuelen 1000 (Ethernet)
RX packets 342 bytes 36804 (35.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 308 bytes 33472 (32.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 22 bytes 2006 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 22 bytes 2006 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:94:b7:d0 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.108/24 brd 192.168.1.255 scope global eth0
inet6 fe80::a00:27ff:fe94:b7d0/64 scope link
valid_lft forever preferred_lft forever
[root@localhost ~]# ping 192.168.1.103
PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
64 bytes from 192.168.1.103: icmp_seq=1 ttl=64 time=0.383 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=64 time=0.233 ms
^C
--- 192.168.1.103 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1054ms
rtt min/avg/max/mdev = 0.233/0.308/0.383/0.075 ms
[root@localhost ~]# iptables -L -n (查看防火墙规则)
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost ~]# iptables -F (清空防火墙规则)
[root@localhost ~]# systemctl stop firewalld.service (关闭防火墙)
[root@localhost ~]# systemctl disable firewalld.service(禁止开机启动)
[root@localhost ~]# iptables -L -n(查看防火墙规则)
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost ~]# iptables -F(清空防火墙规则)
[root@localhost ~]# service iptables stop(关闭防火墙)
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@localhost ~]# chkconfig iptables off(禁止开机启动)
[root@localhost ~]# echo $SHELL
/bin/bash
临时关闭selinux
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
永久关闭selinux [root@localhost ~]# vi /etc/selinux/config 将SELINUX=enforcing改为SELINUX=disabled 重启
[root@localhost ~]# reboot(7可以systemctl reboot)
[root@localhost ~]# poweroff(7可以systemctl poweroff)
[root@localhost ~]# tty
/dev/pts/0
每启动一个终端设备,将关联一个用户接口,与用户交互的shell
[root@localhost ~]#
+学习 +修改 +使用 +分发 +创建衍生版 以上都是自由的,用开源协议保证
文件是按名存取的有边界的数据流
目录是路径映射
文件系统是以目录为索引的层级结构
以根/为顶点的倒置树状结构 /dev/pts/0的第一个/为根目录,后面的/为路径分隔符,windows为\
从根开始表示路径
从当前位置开始表示路径
[root@localhost ~]# pwd
/root
[root@localhost ~]# basename /dev/pts/0
0
[root@localhost ~]# dirname /dev/pts/0
/dev/pts
标签:连通性 centos 组成 restart term 登录 pow eve 接口
原文地址:https://www.cnblogs.com/xuluchuan/p/9130051.html