Siedemnaste_21

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

Vous devez vous connecter pour poster un commentaire.