Top 10 Linux Job Interview Questions

These are notes I have taken while watching tutorialLinux's video "Top 10 Linux Job Interview Questions".

Q: How can you see which kernel version a system is currently running?
A: uname uname prints out system information. More specifially uname -a will list all the information you would need/want to know about the system you are on.

Q: How can you check a system's current IP Address?
A: ifconfig OR ip addr show

Q: How do you check for free disk space?
A: df -ah This will give you a readout of all of your file systems including virtual file systems.

Q: How do you manage services on a system?
A: (OLD) service status service start service stop     (NEW) systemctl status

Q: How would you check the size of a directory's contents on disk?
A: du -sh

Q: How would you check for open ports on a Linux machine?
A: sudo netstat -tulpn

Q: How do you check CPU usage for a given process?
A: ps aux | grep OR top OR htop

Q: Mounting
A: Mounting a new harddrive: ls /mnt mount e.g mount /dev/sda2 /mnt Checking for existing mounts: mount

Q: If you need to automatically mount a volume at boot, what file would you look in?
A: less /etc/fstab

Q: How do you look up something you don't know?
A: man All hail the man/manual pages!!

OR

Google/Stack Overflow... duh