https://github.com/livialima/linuxupskillchallenge
https://tldp.org/LDP/intro-linux/html/index.html
◦ ps ◦ df ◦ du ◦ vim ◦ top ◦ less ◦ more ◦ zless ◦ grep
systemctl status sshd
ss -patun | grep 2222
Install a package
yum install -y firewalld
List Firewall ports
firewall-cmd --list-all
Add predefined services
firewall-cmd --permanent --add-service=httpd
List predefined services
firewall-cmd --get-services
Add a service to the firewall
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
Open a port in linux, replace tcp with udp for UDP ports
firewall-cmd --add-port=portnumber/tcp --permanent
firewall-cmd --reload
setenforce 0
Read about SELinux first https://wiki.gentoo.org/wiki/SELinux/Tutorials https://wiki.gentoo.org/wiki/Category:SELinux https://wiki.gentoo.org/wiki/SELinux/Tutorials/How_SELinux_controls_file_and_directory_accesses
Install a package or multiple
yum install -y vim tmux
repoquery -l httpd
yum list installed | grep httpd
pgrep httpd
ps aux | grep httpd
ps -ylC httpd
• vim → press i to go to insert mode, vimtutor will help you learn basic vim • wc → Word Count for lines → wc -l #https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/text-information-tools.html • shell redirection, >, >>, 2>1 # https://tldp.org/LDP/abs/html/io-redirection.html
Basic file commands https://tldp.org/LDP/abs/html/basic.html • less => View files in a pager mode -> Ability to view and search text • cat → Spit all the lines to the terminal • zless → compressed files • zgrep → grep through compressed files • grep → grep through files