FANDOM


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?Edit

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?Edit

A: 

ifconfig

OR 

ip addr show

Q: How do you check for free disk space?Edit

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?Edit

A: (OLD) 

service <service name> status
service <service name> start
service <service name> stop

    (NEW) 

systemctl status <service name>

Q: How would you check the size of a directory's contents on disk?Edit

A: 

du -sh <directory name>

Q: How would you check for open ports on a Linux machine?Edit

A: 

sudo netstat -tulpn

Q: How do you check CPU usage for a given process?Edit

A: 

ps aux | grep <process name>

  OR

top

 OR

htop

Q: MountingEdit

A: Mounting a new harddrive:

ls /mnt
mount <absolute path to the volume> <mount point>

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?Edit

A: 

less /etc/fstab

Q: How do you look up something you don't know?Edit

A: 

man <command>

All hail the man/manual pages!!

OR

Google/Stack Overflow... duh



    



    

Community content is available under CC-BY-SA unless otherwise noted.