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 time-saving command aliases does linux have?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces what linux can save time command aliases, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.

The Linux command line alias is perfect for helping you improve your productivity. Even better, some aliases are included by default in the Linux distribution you install.

This is an example of a command alias in Fedora 27:

This alias command lists existing aliases. Setting aliases is also very simple:

Alias new_name= "command"

Here are 15 command line aliases to save you time:

1. Install any application utilities / applications:

Alias install= "sudo yum install-y"

Here, depending on each user's preference, sudo and-y are optional:

Install alias.png

2. Update the system:

Alias update= "sudo yum update-y"

3. Upgrade the system:

Alias upgrade= "sudo yum upgrade-y"

4. Switch root users:

Alias root= "sudo su -"

5. Switch to the "user" user, where user is set to your user name:

Alias user= "su user"

6. Display and list all available ports, status and IP:

Alias myip= "ip-br-c a"

7. Ssh to your server myserver:

Alias myserver= "ssh user@my_server_ip"

8. List all processes in the system:

Alias process= "ps-aux"

9. Check the service status of the system:

Alias sstatus= "sudo systemctl status"

10. Restart system services:

Alias srestart= "sudo systemctl restart"

11. Kill the process by name:

Alias kill= "sudo pkill"

Kill process alias.png

12. Show that the system always uses memory and free memory:

Alias mem= "free-h"

13. Display the system CPU framework structure, number of CPU, number of threads, etc.

Alias cpu= "lscpu"

14. Display the total disk size of the system:

Alias disk= "df-h"

15. Display the current system Linux release version (for CentOS, Fedora and Red Hat):

Alias os= "cat / etc/redhat-release"

Thank you for reading this article carefully. I hope the article "what are the time-saving command aliases for linux" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Servers

Wechat

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

12
Report