In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what are the Linux interview questions". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what are the Linux interview questions?"
1. Suppose you are maintaining a daily backup for the company you work for. This backup is maintained in a compressed format. Now that you need to check a log from two months ago, what suggestions should you make so that you can complete the task of checking the log without decompressing the backup?
Answer: to check the contents of the file without unzipping it, we need to use 'zcat'. The zcat tool can easily accomplish this task.
# zcat f phpshell 2.4.tar.gz
two。 You need to track events in your system. What should you do?
Answer: in order to track events in the system, we need to use this daemon called syslogd. Syslogd is a daemon that tracks system information and saves it to a specified log file.
Enabling the 'syslogd'' background process generates a log file in the path'/ var/log/syslog'. Syslogd application is very useful for solving problems in Linux system. The log file generated by the standard is very similar to the following example.
3. How do I prevent a specific IP from accessing a FTP server?
Answer: we can block suspicious IP access by using tcpwrapper. First set the tcpwrapper parameter to "tcp_wrapper=YES" in the configuration file of the path'/ etc/vsftpd.conf', and then add the suspicious IP address to the'/ etc/host.deny' file.
Forbidden IP address
Open the'/ etc/hosts.deny' file.
# vi / etc/hosts.deny
Add the denied IP address at the bottom of the file
The code is as follows:
#
# hosts.deny This file contains access rules which are used to
# 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: both Telnet and SSH are protocols for managing systems remotely. Contrary to the direct data transmission of Telnet, a secure SSH communication protocol requires the exchange of keys in the communication, which shows that telnet is less secure than 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 did with'/ etc/init.d/gdm stop'. We need to execute a special key combination 'Ctrl+ Alt+ BackSpace' that causes X server to restart.
6. Tell me the difference between the command 'ping'' and 'ping6''?
Answer: these two commands have the same function, but the 'ping6' command can be used for the IP address of ipv6.
7. If you want to find the * .tar file in the Home directory and delete it at once, what will you do?
Answer: we will use both the find and rm commands to delete all * .tar files
# find / home/ name'* .tar'| xargs rm rf
What is the difference between the 8.locate and slocate commands?
Answer: slocate (secure locate) looks for files that all users have access to, while locate searches for all updated results (in its database).
9. You want to search for the string "Tecmint" in all the ".txt" files in the current directory. What do you do?
Answer: use the find command to recursively find the "Tecmint" string in the file in the current directory.
# find name "* .txt" | xargs grep "Tecmint"
10. You want to send a message like "Server is going down for maintenance" to all connected users. What do you do?
Answer: it can be easily done with the wall command, and the wall command can send information to all users who are connected to the server.
# echo please save your work, immediately. The server is going down for Maintenance at 12:30 Pm, sharply. | | wall |
The above is all the contents of the article "what are the Linux interview questions?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.