Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the eight weird guys at the Linux terminal?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "what are the eight weird guys in the Linux terminal?" in the operation of actual cases, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1 、 daemon

Daemon has a very high-end Chinese name, called daemon. There is a saying that if there is no daemon in Unix, then Unix will not be the same. It has a lot of personality, it is a process that runs in the background and is not controlled by the terminal, most of which are started when the system is started, and will keep running until the system is shut down under no special circumstances. Its existence provides useful services for our users and the system itself. The common ones are httpd,mysqld,syslogd, etc., and the general daemon name ends with d.

2 、 zombie

Zombie, zombie? What the hell? It sounds scary. However, in Linux, it means that when a process is killed, it does not disappear immediately, but becomes a zombie, that is, a zombie process, and then waits for its parent process to collect its information before it is cleared. Usually this process of gathering information is completed quickly, but sometimes its parent process is busy and the zombie process stays in our system all the time. Some zombie processes are generated from time to time when the system is running, and we can't kill them directly because they are dead, so we have to take other measures, such as killing its parent process, and then init will recover the zombie process. The emergence of a zombie process usually means that the process that produced it is not only a problem, but also it consumes resources, so it needs to be prevented.

3 、 kill

Kill, a ruthless word. As the name implies, kill is a command used to kill a process, and it is used in a simple and rough way. When you find a process that takes up too much memory or CPU resources and has a negative impact, it is recommended that you kill it directly with kill. What if you encounter a zombie process that can't be killed? Don't panic, go to its parent process and deal with it according to the method mentioned above.

4 、 cat

Cat, the cat? What kind of strange thing is this? Besides zombies, there are cats in Linux? In fact, the cat command is the abbreviation of concatenate, that is, the meaning of connection, so you can understand it. Its function is to combine files. In addition, you can even use this convenient command to view the contents of the file.

5 、 tail

Tail, tail. This strange order is easier to explain. It is convenient to use the tail command when you want to view the last n lines of the file. In addition, you can also use it when you want to monitor files. For example, if you look at the log file, the tail command will display the contents of the tail and can be updated in real time. Isn't that awesome?

6 、 which

Which, don't look at the first few weird commands and get confused with witch. It's not the spooky witch in the fairy tale, it's which, the guy responsible for printing the location of the file associated with any command passed to it. For example, if we want to get the location of Python, we can use which python, and it will print the location of each version of Python on your system.

7 、 crypt

Crypt, basement, this order is also easy to understand. When you want to take care of your belongings from others, it is a good way to lock them in the basement. Crypt, which means encryption in Linux, is now called mcrypt, which is handy when you want to encrypt files without being read by others. Like most Linux commands, you can use crypt alone or in system scripts.

8 、 shred

Shred, cut it up. I think you can see that these strange words are not strange here. It is a very ruthless guy whose function is to smash files. When we want to delete a file, we use the rm command, but there is a means to restore it, so what if we don't want others to recover? Yes, that's what sherd does. Shred can overwrite the space previously occupied by the file multiple times. Therefore, it is necessary to be psychologically prepared to use this command, because the immortals are difficult to save.

This is the end of the content of "what are the eight weird guys in the Linux terminal". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report