15 Linux Command Aliases That Will Save You Time

15 Linux Command Aliases That Will Save You Time

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:
  • How to configure aliases for commands in Linux system
  • Linux Learning CentOS (Twenty-nine) - Linux network card advanced commands, IP aliases and multi-network card binding methods
  • Summary of ten Linux command aliases that can improve efficiency

<<:  7 Best VSCode Extensions for Vue Developers

>>:  Ubuntu 16.04 mysql5.7.17 open remote port 3306

Recommend

Detailed explanation of Vue life cycle functions

Table of contents Lifecycle Functions Common life...

MySQL 8.0.12 decompression version installation tutorial personal test!

Mysql8.0.12 decompression version installation me...

Steps for Vue3 to use mitt for component communication

Table of contents 1. Installation 2. Import into ...

How to add a pop-up bottom action button for element-ui's Select and Cascader

As shown in the figure below, it is a common desi...

Implementation of Docker batch container orchestration

Introduction Dockerfile build run is a manual ope...

Vue uses rules to implement form field validation

There are many ways to write and validate form fi...

How to set MySQL foreign keys for beginners

Table of contents The role of foreign keys mysql ...

Detailed explanation of the relationship between React and Redux

Table of contents 1. The relationship between red...

Detailed explanation of virtual DOM and diff algorithm in react

The role of virtual DOM First of all, we need to ...

Summary of problems encountered when installing docker on win10 home version

Docker download address: http://get.daocloud.io/#...

Use Python to connect to MySQL database using the pymysql module

Install pymysql pip install pymysql 2|0Using pymy...

How to count down the date using bash

Need to know how many days there are before an im...

How to encapsulate axios request with vue

In fact, it is very simple to encapsulate axios i...

How to execute Linux shell commands in Docker

To execute a shell command in Docker, you need to...