Preface In the process of managing and maintaining the Linux system, a large number of commands will be used. Some very long commands or usages are often used. It is not advisable to repeatedly and frequently enter a very long command or usage. At this time, you can use the command alias function to simplify this process. Some aliases are included by default in your installed Linux distribution. Linux command line aliases are great for helping you be more productive. Even better, some aliases are included by default in your installed Linux distribution. Here is an example of a command alias in Fedora 27: The alias command lists existing aliases. Setting up an alias is also very simple: alias new_name="command" Here are 15 command line aliases that will save you time: 1. Install any application utility/app: alias install="sudo yum install -y" Here, sudo and -y are optional, depending on each user's preference: 2. Update the system: alias update="sudo yum update -y" 3. Upgrade system: alias upgrade="sudo yum upgrade -y" 4. Switch to root user: alias root="sudo su -" 5. Switch to the "user" user, where user is set to your username: alias user="su user" 6. Display and list all available ports, status and IP: alias myip="ip -br -ca" 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 process by name: alias kill="sudo pkill" 12. Display the total memory used and free memory of the system: alias mem="free -h" 13. Display system CPU framework structure, CPU quantity, thread number, etc.: alias cpu="lscpu" 14. Display the total disk size of the system: alias disk="df -h" 15. Display the current system Linux distribution version (applicable to CentOS, Fedora and Red Hat): alias os="cat /etc/redhat-release" via: https://opensource.com/article/18/8/time-saving-command-line-aliases Author: Aarchit Modi Topic: lujun9972 Translator: MZqk Proofreader: wxy Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: 7 Best VSCode Extensions for Vue Developers
>>: Ubuntu 16.04 mysql5.7.17 open remote port 3306
Table of contents Lifecycle Functions Common life...
Mysql8.0.12 decompression version installation me...
Table of contents 1. Installation 2. Import into ...
As shown in the figure below, it is a common desi...
Introduction Dockerfile build run is a manual ope...
There are many ways to write and validate form fi...
Table of contents The role of foreign keys mysql ...
Table of contents 1. The relationship between red...
The role of virtual DOM First of all, we need to ...
Docker download address: http://get.daocloud.io/#...
1. The first method is to start the local tomcat ...
Install pymysql pip install pymysql 2|0Using pymy...
Need to know how many days there are before an im...
In fact, it is very simple to encapsulate axios i...
To execute a shell command in Docker, you need to...