Siedemnaste_21

 0    21 flashcards    michalesq
In chơi tự kiểm tra
 
câu hỏi - câu trả lời -
Delete the last line
bắt đầu học
sed '$d' file. txt
Print only lines with three consecutive digits
bắt đầu học
sed '/[0-9]\{3\}/p' file. txt
Unless boom is found replace aaa with bb
bắt đầu học
sed '/boom/! s/aaa/bb/' file. txt
Delete all lines from line 17 to 'disk'
bắt đầu học
sed '17,/disk/d' file. txt
How to install software for firewall and firewall-conf
bắt đầu học
yum install firewall firewall-config
Display firewall zones
bắt đầu học
firewall-cmd --get-zones
Display display default zone
bắt đầu học
firewall-cmd --get-default-zone
List services in default zone (public)
bắt đầu học
firewall-cmd --list-all
List services in home zone
bắt đầu học
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)
bắt đầu học
firewall-cmd --zone=home --add-source=192.168.1.0/24
How to reload firewalld
bắt đầu học
firewall-cmd --reload
Persistently add source IP to zone home, all services will be allowed for this source (needs reload/restart to appear)
bắt đầu học
firewall-cmd --zone=home -- permanent --add-source=192.168.1.0/24
Not persistently add port 80/tcp to zone public
bắt đầu học
firewall-cmd --zone=public --add-port=80/tcp
Persistently add port 80/tcp to zone public
bắt đầu học
firewall-cmd --zone=public --permanent --add-port=80/tcp
opens a GUI firewall config if you use graphical interface
bắt đầu học
firewall-config
how to generate public and private key for authentication
bắt đầu học
ssh-keygen -t rsa
display state of selinux
bắt đầu học
getenforce
changing state to permissive
bắt đầu học
setenforce 0
changing state to enforcing
bắt đầu học
setenforce 1
disable selinux
bắt đầu học
/etc/selinux/config SELINUX=disabled
Display full SElinux context (user, role and type)
bắt đầu học
ls -Z

Bạn phải đăng nhập để đăng bình luận.