Linux Interview Questions:Basic
Basic linux interview questions 1)How do you find out what’s your shell? – echo $SHELL 2)What’s the command to find out today’s date? – date 3)How do you find out the current directory you’re in? – pwd 4)How do you find out your own username? – whoami/who am i 5)How do you send a mail message to somebody? – mail surendra@linuxnix.com -s ‘Your subject’ -c ‘test@gmail.com‘ 6)What’s the command to find out users on the system? – who/users 7)How do you remove a file? – rm 8)How do you remove a – rm -rf 9)How do you count words, lines and characters in a file? – wc 10)How do you search for a string inside a given file? – grep string filename 11)How do you search for a string inside a directory? – grep string * 12)How do you search for a string in a directory with the subdirectories recursed? – grep -r string * 13)What are PIDs? – They are process IDs given to processes. A PID can vary from 0 to 65535. 14)How do you list currently running process? – ps 15)How do you stop a process? – kill pid 16)How do you find out about all running processes? – ps -ag 17)How do you stop all the processes, except the shell window? – kill 0 18)How do you fire a process in...
Read More