In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what are the commonly used aliases in Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
In the Linux system, aliases can greatly improve our work efficiency.
1. Untar
Compressed package files, especially tar files, are widely used under Linux, but there are many options for the tar command that are hard to remember. So we can define several commonly used options as an alias untar, so that when we need to extract the tar file, we can simply untar filename it.
Alias untar='tar-zxvf'2. Wget
When we were downloading a large file, suddenly the network was abnormally interrupted. Are we crazy to download it again? Don't worry, our wget command has a-c option that supports breakpoint downloads, or we can set it as an alias:
Alias wget='wget-c'3. Getpass
Sometimes we need to generate a 20-character random number password, we can use the openssl command, but the complete command is very long and inconvenient, we can set an alias:
Alias getpass= "openssl rand-base64 20" 4. Sha
After downloading a file, we want to verify its checksum value. We can encapsulate this command as an alias sha, and then we sha filename can verify the checksum value of the file.
Alias sha='shasum-a 256'5. Ping
Normally, the ping command will output an unlimited number of times, but it doesn't really make much sense. We can use the-c command to limit it to five outputs, then set it to the alias ping, and when using it, ping url.
Alias ping='ping-c 5 # 6. Www
If we want to start a web server anytime, anywhere, we can use this alias:
Alias www='python-m SimpleHTTPServer 80007. Speed
Network speed testing is also often used at work, but Linux does not have its own commands available, so we can use the third-party tool speedtest-cli. This tool can be downloaded directly from Github and is described in detail in how to use it. We need to first use the speedtest-cli command to select the closest server to us, and then set the following alias:
Alias speed='speedtest-cli-server 2406-simple'8. Ipe
What is your public network IP? If you have a good memory, you can memorize it directly, but what if you have 10 servers on 100 servers? You can also memorize it and participate in the strongest brain. In fact, there is a command that can be queried directly, but that command is too abnormal to remember, so it is decisively set as an alias.
Alias ipe='curl ipinfo.io/ip'9. Ipi
How to know your own local area network IP? This command is also perverted, decisively setting aliases.
Alias ipi='ipconfig getifaddr en0'10. C
Finally, to clear the screen, we can use the ctrl + l shortcut key, or we can define the clear command shorter, which makes it more direct and rough to use.
Alias clockwise clear'
You may not be able to use all of these 10 commands, because people use Linux in different directions and work in different ways. There must also be a large number of complex and cumbersome commands in your field of work that can be defined as aliases.
This is the end of this article on "what are the common aliases in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.