1.查看所用的shell的类型:
[[email protected] ~]# echo $SHELL
/bin/bash
2.ss命令:
功能:查看系统监听端口(socket)
选项:
-t:tcp协议
-u:udp协议
-n:解析服务名称
-l:监听端口号
示例:
[[email protected] ~]# ss -tnl
3.ifconfig/ip addr list命令:
功能:查看服务器IP地址
示例:
[[email protected] ~]# ifconfig
[[email protected] ~]# ip addr list
4.关机命令:
CentOS 7:
[[email protected] ~]# systemctl poweroff
[[email protected] ~]# systemctl reboot
适用于所有系统:
[[email protected] ~]# poweroff
[[email protected] ~]# halt
[[email protected] ~]# reboot
5.basename/dirname命令:
basename - strip directory and suffix from filenames
dirname - strip non-directory suffix from file name
[[email protected] ~]# basename /etc/sysconfig/network-scripts/ifcfg-eno16777736
ifcfg-eno16777736
[[email protected] ~]# dirname /etc/sysconfig/network-scripts/ifcfg-eno16777736
/etc/sysconfig/network-scripts
后续再写