Siedemnaste_21

 0    21 词汇卡    michalesq
打印 检查自己
 
问题 - 答案 -
Delete the last line
开始学习
sed '$d' file. txt
Print only lines with three consecutive digits
开始学习
sed '/[0-9]\{3\}/p' file. txt
Unless boom is found replace aaa with bb
开始学习
sed '/boom/! s/aaa/bb/' file. txt
Delete all lines from line 17 to 'disk'
开始学习
sed '17,/disk/d' file. txt
How to install software for firewall and firewall-conf
开始学习
yum install firewall firewall-config
Display firewall zones
开始学习
firewall-cmd --get-zones
Display display default zone
开始学习
firewall-cmd --get-default-zone
List services in default zone (public)
开始学习
firewall-cmd --list-all
List services in home zone
开始学习
firewall-cmd --zone=home --list-all
Not persistently add source IP to zone home, all services will be allowed for this source (disappaear after a reload/restart)
开始学习
firewall-cmd --zone=home --add-source=192.168.1.0/24
How to reload firewalld
开始学习
firewall-cmd --reload
Persistently add source IP to zone home, all services will be allowed for this source (needs reload/restart to appear)
开始学习
firewall-cmd --zone=home -- permanent --add-source=192.168.1.0/24
Not persistently add port 80/tcp to zone public
开始学习
firewall-cmd --zone=public --add-port=80/tcp
Persistently add port 80/tcp to zone public
开始学习
firewall-cmd --zone=public --permanent --add-port=80/tcp
opens a GUI firewall config if you use graphical interface
开始学习
firewall-config
how to generate public and private key for authentication
开始学习
ssh-keygen -t rsa
display state of selinux
开始学习
getenforce
changing state to permissive
开始学习
setenforce 0
changing state to enforcing
开始学习
setenforce 1
disable selinux
开始学习
/etc/selinux/config SELINUX=disabled
Display full SElinux context (user, role and type)
开始学习
ls -Z

您必须登录才能发表评论。