Linux Job Interview Questions

  1. How can you see which kernel version a system is currently running?
uname -a  // Show hostname, current version, current release

uname -v  //Show current version

uname -r  // Show current release

2.How can you check a system’s current IP address?

ifconfig

ip addr show

ip addr show eth0
  1. How do you check for free disk space?
df -ah
  1. How dow you manage services on a system?
service <service name> status

systemctl status <service name>
  1. How would you check the size of a directory’s contents on disk?
du -sh <directory name>
  1. How would you check for open ports on a Linux machine?
netstat

sudo netstat  -tulpn
  1. How do you check CPU usage for a process?
ps aux |grep <process name> 

top

htop

  1. Dealing with Mounts
ls /mnt

mount <device/network drive> <mount point>

/etc/fstab

  1. How do you look up something you don’t know?
man <command>

<command> --h

google
Written on March 27, 2017