Linux administration is a complex field that requires an immense amount studying and dedication. Below are ten common entry-level interview questions. Now I must add that you should not memorize these questions, but instead should use them as a basis for your level of comparability.
1. How do you check the kernel version on a Linux machine?
The command uname should be the first thought, however cat /proc/version has the exact same information.
2. How do you tell the open ports on a Linux machine?
The most basic answer is to use the command netstat -tupln. Netstat shows the network status of the machine. It can identify what ports are open, closed, what services are listening, and who they are allowed to receive requests from.
3. What are the most common ports and what services do they usually run?
This question is great, because it shows that you understand, at least on a basic level the idea of networking. The most common ports: 20, 21 are for FTP, 23 is for Telnet, 22 is for SSH, 25 is for SMTP, 53 is for DNS, 56 and 57 is for DHCP, 80 is for HTTP, 143 is for IMAP, and 443 is for HTTPS.
4. How do you find out the IP address of your Linux machine?
For most new systems, the command ip addr will display the full interface network information. On older systems, the command ifconfig -a can be used as well.
5. What is your favorite Linux distribution and why?
My personal favorite is my old friend Ubuntu, sure some may look down on it, but it's my favorite because it was the operating system that started a spark.
6. What is BASH and how do you use it?
BASH is a scripting and command language that was the replacement to BSH. BASH stands for Bourne Again Shell.
7. What is IPtables?
IPtables is a built-in firewall that comes with every major Linux distribution. It's the succession to the previous IPchains firewall.
8. What is the difference between /etc/shadow and /etc/passwd?
The main difference is that the /etc/shadow file is where the password information is stored, specifically the hash. The /etc/passwd file stores user information, like the User ID, group ID, home directory, user shell, along with much more.
9. How do you see if a process is running?
You can check to see if a process is running by using the command ps aux followed by a piped grep to narrow down my search. (I.E: ps aux | grep ssh) The program top also works great as well as htop, which you have to install.
10. How would you go about looking up something you are unfamiliar with?
If I am unfamiliar with a particular command or program, the first thing I will do is search for a man page about the topic. If I am still uncertain then I will look to the web, mainly searching on forums or searching for readily available documentation. If after about 15 to 30 minutes of research and I am still confused, I will ask a colleague about what I am confused about.