Interview Questions and Answers
Freshers / Beginner level questions & answers
Ques 1. What is the purpose of the 'chmod' command in Linux?
The 'chmod' command is used to change the permissions of a file or directory in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 2. Explain the difference between 'rm' and 'rmdir' commands.
'rm' is used to remove files, while 'rmdir' is used to remove empty directories.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 3. What is the role of the 'grep' command in Linux?
'grep' is used for searching patterns in files. It stands for 'Global Regular Expression Print.'
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 4. How do you check the free disk space in Linux?
The 'df' command is used to display the amount of disk space available on the file system.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 5. Explain the purpose of the 'ls' command.
'ls' is used to list files and directories in a directory.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 6. What is the purpose of the 'ps' command?
'ps' is used to display information about the currently running processes.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 7. How do you find the process ID (PID) of a running process?
The 'pgrep' or 'pidof' command can be used to find the PID of a running process.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 8. What is a symbolic link in Linux?
A symbolic link is a file that serves as a reference to another file or directory.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 9. Explain the purpose of the 'sudo' command.
'sudo' is used to execute commands with administrative or superuser privileges.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 10. What is the purpose of the 'tar' command?
'tar' is used to create and manipulate archive files.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Intermediate / 1 to 5 years experienced level questions & answers
Ques 11. 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 12. What is the significance of the '/etc/passwd' file?
The '/etc/passwd' file stores user account information, including usernames and home directories.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 13. 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 14. Explain the purpose of the 'cron' scheduler in Linux.
'cron' is a time-based job scheduler in Unix-like operating systems.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 15. 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 16. 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 17. 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 18. 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 19. What is the purpose of the 'awk' command in Linux?
'awk' is a powerful programming language mainly used for pattern scanning and processing.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Experienced / Expert level questions & answers
Ques 20. Explain the purpose of the 'iptables' command.
'iptables' is used to set up, maintain, and inspect the tables of IP packet filter rules in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 21. How do you find files larger than a specific size in Linux?
The 'find' command with the '-size' option can be used to find files larger than a specified size.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 22. What is a daemon in Linux?
A daemon is a background process that runs without direct user interaction.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 23. Explain the purpose of the 'chroot' command.
'chroot' is used to change the root directory for a specified command or shell.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 24. How do you check the status of a service in Linux?
The 'systemctl' command is used to check the status of a service in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 25. What is a shell script in Linux?
A shell script is a series of commands written in a script file to be executed by the shell.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 26. Explain the purpose of the 'umask' command.
'umask' is used to set the default file permissions for newly created files.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 27. How do you create a swap file in Linux?
The 'dd' command and 'mkswap' command are used to create a swap file in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 28. What is the purpose of the 'crontab' command?
'crontab' is used to create, view, and edit cron jobs in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 29. How do you find all files modified in the last 7 days?
The 'find' command with the '-mtime' option can be used to find files modified within a specific time frame.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 30. Explain the purpose of the 'rsync' command.
'rsync' is used for file synchronization and transfer between systems.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 31. What is the purpose of the 'ldconfig' command?
'ldconfig' is used to configure dynamic linker run-time bindings.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 32. How do you create a hard link in Linux?
The 'ln' command is used to create hard links in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 33. Explain the purpose of the 'journalctl' command.
'journalctl' is used to query and display messages from the journal, managed by 'systemd-journald' service.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 34. What is the purpose of the 'crash' command in Linux?
'crash' is used to analyze the Linux kernel core dumps.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 35. How do you change the hostname in Linux?
The 'hostnamectl' command is used to change the hostname in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 36. Explain the purpose of the 'journalctl' command.
'journalctl' is used to query and display messages from the journal, managed by 'systemd-journald' service.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 37. What is the purpose of the 'crash' command in Linux?
'crash' is used to analyze the Linux kernel core dumps.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 38. How do you change the hostname in Linux?
The 'hostnamectl' command is used to change the hostname in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 39. What is the purpose of the 'journalctl' command.
'journalctl' is used to query and display messages from the journal, managed by 'systemd-journald' service.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 40. What is the purpose of the 'crash' command in Linux?
'crash' is used to analyze the Linux kernel core dumps.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 41. How do you change the hostname in Linux?
The 'hostnamectl' command is used to change the hostname in Linux.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 42. What is the purpose of the 'journalctl' command.
'journalctl' is used to query and display messages from the journal, managed by 'systemd-journald' service.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Ques 43. What is the purpose of the 'crash' command in Linux?
'crash' is used to analyze the Linux kernel core dumps.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
Most helpful rated by users:
- What is the purpose of the 'chmod' command in Linux?
- Explain the difference between 'rm' and 'rmdir' commands.
- What is the role of the 'grep' command in Linux?
- Explain the purpose of the 'ls' command.
- Explain the purpose of the 'sudo' command.
Related differences
Related interview subjects
| Ubuntu interview questions and answers - Total 30 questions |
| Linux interview questions and answers - Total 43 questions |
| 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 |