In order to bring you some small surprises, this time we have prepared some questions randomly encountered during the interview, rather than questions about a specific field. These questions will certainly make you stand out in the interview without further learning new knowledge.
Recommended: 10 Linux Interview Questions and answers for different application scenarios
1. Assume that you are maintaining a daily backup for your company. This backup is maintained in a compressed format. Now you need to check a log generated two months ago. What kind of suggestions should you make to complete the Log check task without interrupting the backup?
Answer: Check the file content without interrupting the file. We need to use 'zcat '. The zcat tool can easily complete this task.
- # Zcat f phpshell1_2.4.tar.gz
2. You need to track events in your system. What should you do?
Answer: To track events in the system, we need to use the background program syslogd. The syslogd background program can trace system information and save it to a specified log file.
When 'syslogd' is enabled, the background process generates a log file in the path '/var/log/syslog. The syslogd application is very useful for solving problems in Linux systems. The standard log file is similar to the following example.
3. How can I disable a specific IP address from accessing the FTP server?
Answer: We can use tcpWrapper to prohibit access from suspicious IP addresses. First, in the configuration file in the '/etc/vsftpd. conf' pathSet wrapper to "tcp_wrapper = YES" and add a suspicious IP address to the '/etc/host. deny' file.
IP address prohibited
Open the '/etc/hosts. deny' file.
- # Vi/etc/hosts. deny
Add a denied IP address to the bottom of the file
- #
- # Hosts. deny This file contains access rules which are used
- # Deny connections to network services that either use
- # The tcp_wrappers library or that have been
- # Started through a tcp_wrappers-enabled xinetd.
- #
- # The rules in this file can also be set up in
- #/Etc/hosts. allow with a 'deny' option instead.
- #
- # See 'man 5 hosts_options 'and 'man 5 hosts_access'
- # For information on rule syntax.
- # See 'man tcpd' for information on tcp_wrappers
- #
- Vsftpd: 172.16.16.1
4. Tell us the difference between Telnet and SSH?
Answer: Telnet and SSH are both protocols used to remotely manage the system. In contrast to direct data transmission via Telnet, Secure SSH communication protocols require Key Exchange in communications, which means that telnet is not secure compared with SSH.
5. You need to terminate your X server, but when you try to kill the process, you encounter an error message indicating that you cannot exit X server. What are you going to do?
Answer: when you try to kill the process of X server, the system will not let you exit X server as normally as you use '/etc/init. d/TPD stop. We need to execute a special key position combination 'ctrl + Alt + backspace' to restart X server '.
For more details, please continue to read the highlights on the next page: