10 Linux Questions and Answers randomly asked during the interview

Source: Internet
Author: User

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.

  1. # 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.

  1. # Vi/etc/hosts. deny

Add a denied IP address to the bottom of the file

  1. #
  2. # Hosts. deny This file contains access rules which are used
  3. # Deny connections to network services that either use
  4. # The tcp_wrappers library or that have been
  5. # Started through a tcp_wrappers-enabled xinetd.
  6. #
  7. # The rules in this file can also be set up in
  8. #/Etc/hosts. allow with a 'deny' option instead.
  9. #
  10. # See 'man 5 hosts_options 'and 'man 5 hosts_access'
  11. # For information on rule syntax.
  12. # See 'man tcpd' for information on tcp_wrappers
  13. #
  14. 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:

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.