Siedemnaste_21

 0    21 speciālā zīme    michalesq
Drukāt spēlēt pārbaudiet sevi
 
jautājums - atbilde -
Delete the last line
sākt mācīties
sed '$d' file. txt
Print only lines with three consecutive digits
sākt mācīties
sed '/[0-9]\{3\}/p' file. txt
Unless boom is found replace aaa with bb
sākt mācīties
sed '/boom/! s/aaa/bb/' file. txt
Delete all lines from line 17 to 'disk'
sākt mācīties
sed '17,/disk/d' file. txt
How to install software for firewall and firewall-conf
sākt mācīties
yum install firewall firewall-config
Display firewall zones
sākt mācīties
firewall-cmd --get-zones
Display display default zone
sākt mācīties
firewall-cmd --get-default-zone
List services in default zone (public)
sākt mācīties
firewall-cmd --list-all
List services in home zone
sākt mācīties
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)
sākt mācīties
firewall-cmd --zone=home --add-source=192.168.1.0/24
How to reload firewalld
sākt mācīties
firewall-cmd --reload
Persistently add source IP to zone home, all services will be allowed for this source (needs reload/restart to appear)
sākt mācīties
firewall-cmd --zone=home -- permanent --add-source=192.168.1.0/24
Not persistently add port 80/tcp to zone public
sākt mācīties
firewall-cmd --zone=public --add-port=80/tcp
Persistently add port 80/tcp to zone public
sākt mācīties
firewall-cmd --zone=public --permanent --add-port=80/tcp
opens a GUI firewall config if you use graphical interface
sākt mācīties
firewall-config
how to generate public and private key for authentication
sākt mācīties
ssh-keygen -t rsa
display state of selinux
sākt mācīties
getenforce
changing state to permissive
sākt mācīties
setenforce 0
changing state to enforcing
sākt mācīties
setenforce 1
disable selinux
sākt mācīties
/etc/selinux/config SELINUX=disabled
Display full SElinux context (user, role and type)
sākt mācīties
ls -Z

Lai ievietotu komentāru, jums jāpiesakās.