What is the command to check the current working directory?
what is "pwd"
Which command displays the last few lines of a file?
tail
How do you add a user to a group?
usermod -aG groupname username
What is the command to test connectivity to a remote host?
ping
Which command is used to reboot the system?
reboot
What file contains user account information in Linux?
/etc/passwd
How do you search for a string in a file?
grep
What file contains a list of users who can log in without a password?
/etc/passwd (or more appropriately, users listed in /etc/shadow with an empty password field)
Which command displays the current IP address of your system?
ifconfig or ip addr
What command can be used to kill a process by name?
pkill or kill
Which command would you use to change file permissions?
chmod
What command would you use to count the number of lines, words, and characters in a file?
wc
How do you create a new SSH key pair?
ssh-keygen
What does DNS stand for, and what is its purpose?
Domain Name System, used to translate domain names to IP addresses
How can you view running processes on your system?
ps or top
What is the purpose of the /etc/fstab file?
To define how disk partitions, devices, and remote filesystems are mounted
Which command can be used to find the differences between two files?
diff
What command checks for available updates and security patches?
yum check-update
Which command would you use to trace the path packets take to a destination?
traceroute
How can you remount a filesystem as read-only for troubleshooting?
mount -o remount,ro /mount_point
How can you view hidden files in a directory?
ls -a
How do you recursively copy an entire directory and its contents?
cp -r
Which command is used to modify the SELinux mode?
setenforce
Which protocol is used to securely transfer files over a network?
sftp or scp
What tool can you use to diagnose network connectivity issues?
ping or traceroute