What is the Linux directory for basic programs, and what are some example programs found there?
- ls, cd, cat
What is the Linux directory for system programs, and what are some example programs found there?
- fdisk, mkfs, sysctl
What is the Linux directory for configuration files?
/etc
What is the Linux directory for applications, and what are some example programs found there?
- apt, ncat, nmap
What is the Linux directory for application support and data files?
/usr/share
What are the 8 sections of ‘man’ pages?
How would you search the ‘man’ page for the ‘passwd’ command with a keyword search for ‘passwd’?
man -k passwd
What would be the regex command to search the ‘man’ page for ‘passwd’ command to match on the entire line and avoid sub-string matches?
man -k ‘^passwd$’
How would you search the File Formats section of the man page for the ‘passwd’ command?
man 5 passwd
What are the three commands to find files in Linux?
What is the database used by the ‘locate’ command to search for files in Linux? How do you update this db?
- sudo updatedb
How do you start SSH in Linux?
sudo systemctl start ssh
What does the ‘ss’ command do?
What does the command ‘ss -antlp’ do?
What command would enable SSH to run at start?
sudo systemctl enable ssh
What command starts the Apache server?
sudo systemctl start apache2
What command displays a list of all available services?
systemctl list-unit-files
What command completely removes the package pure-ftpd from Linux?
sudo apt remove –purge pure-ftpd
What is PATH?
How do you display the contents of the PATH environment variable?
echo $PATH
How would you place the IP address 10.11.1.220 into an environment variable?
export b=10.11.1.220
How do you display all current environment variables?
env
How would you rerun a command that is labeled as 1239?
!1239
How would you paste “Add this text” to the existing file text.txt?
echo “Add this text”»_space; text.txt