Linux Interview Questions and Answers
Intermediate / 1 to 5 years experienced level questions & answers
Ques 1. How do you change the default shell for a user in Linux?
The 'chsh' command is used to change the default shell for a user.
Ques 2. What is the significance of the '/etc/passwd' file?
The '/etc/passwd' file stores user account information, including usernames and home directories.
Ques 3. How can you check the available memory in Linux?
The 'free' command is used to display the amount of free and used memory in the system.
Ques 4. Explain the purpose of the 'cron' scheduler in Linux.
'cron' is a time-based job scheduler in Unix-like operating systems.
Ques 5. What is the 'sudoers' file, and how do you edit it?
The 'sudoers' file contains information about who can run what commands as sudo. It can be edited using 'visudo.'
Ques 6. How do you find and kill a process using its port number?
The 'lsof' command can be used to find the process using a port, and 'kill' can be used to terminate it.
Ques 7. What is the purpose of the 'grep' command with the '-v' option?
The '-v' option in 'grep' is used to invert the match, displaying lines that do not match the pattern.
Ques 8. How do you recursively copy files and directories in Linux?
The 'cp' command with the '-r' or '-R' option can be used to copy files and directories recursively.
Ques 9. What is the purpose of the 'awk' command in Linux?
'awk' is a powerful programming language mainly used for pattern scanning and processing.
Most helpful rated by users:
- What is the purpose of the 'chmod' command in Linux?
- What is the role of the 'grep' command in Linux?
- Explain the difference between 'rm' and 'rmdir' commands.
- Explain the purpose of the 'ls' command.
- Explain the purpose of the 'sudo' command.
Related differences
Related interview subjects
Unix interview questions and answers - Total 105 questions |
Weblogic interview questions and answers - Total 30 questions |
Tomcat interview questions and answers - Total 16 questions |
Glassfish interview questions and answers - Total 8 questions |
Ubuntu interview questions and answers - Total 30 questions |
Linux interview questions and answers - Total 43 questions |