30 Handy Bash Shell Aliases For Linux / Unix 

Free photo Computer Prompt Terminal Ubuntu Linux Bash Unix - Max Pixel

Introduction

Bash shell aliases are shortcuts that you can create to make your work in the Linux command line faster and more efficient. With an alias, you can reduce the amount of typing you need to do by defining a shorter and more memorable command to execute a complex or repetitive task.

In this blog, we'll go over 30 handy Bash shell aliases for Linux that can help you become more productive on the command line.

  1. ls - List directory contents

Alias: alias ll='ls -alF'

Description: The alias ll is a convenient way to list the contents of a directory, showing detailed information about each file including permissions, ownership, and file type.

  1. cd - Change directory

Alias: alias ..='cd ..'

Description: The alias .. is a quick way to move up one level in the directory hierarchy.

  1. grep - Search for patterns in files

Alias: alias grep='grep --color=auto'

Description: The alias grep enables the color output of grep, making it easier to read search results.

  1. cp - Copy files or directories

Alias: alias cp='cp -i'

Description: The alias cp makes the cp command interactive, prompting you to confirm before overwriting existing files.

  1. mv - Move or rename files or directories

Alias: alias mv='mv -i'

Description: The alias mv makes the mv command interactive, prompting you to confirm before overwriting existing files.

  1. rm - Remove files or directories

Alias: alias rm='rm -i'

Description: The alias rm makes the rm command interactive, prompting you to confirm before deleting files.

  1. df - Display free disk space

Alias: alias df='df -h'

Description: The alias df displays the free disk space in human-readable format.

  1. du - Display disk usage

Alias: alias du='du -h'

Description: The alias du displays the disk usage in human-readable format.

  1. tail - Display the last lines of a file

Alias: alias tailf='tail -f'

Description: The alias tailf displays the last lines of a file and keeps the output updated as new lines are added.

  1. top - Display system processes

Alias: alias top='htop'

Description: The alias top displays the system processes using htop, which provides a more interactive and detailed view.

  1. history - Display command history

Alias: alias history='history | cut -c 8-'

Description: The alias history displays the command history without line numbers.

  1. tar - Create or extract archives

Alias: alias tar='tar -v'

Description: The alias tar displays verbose output when creating or extracting archives.

  1. unzip - Extract compressed files

Alias: alias unzip='unzip -q'

Description: The alias unzip extracts files without displaying unnecessary information.

  1. ssh - Connect to a remote server

Alias: alias ssh='ssh -v'

Description: The alias ssh displays verbose output when connecting to a remote server.

  1. ping - Test network connectivity

Alias: alias ping='ping -c 5'

Description: The alias ping sends five packets when testing network connectivity.

  1. date - Display the current date and time

Alias: alias now='date +"%T"'

Description: The alias now displays the current time in 24-hour format.

  1. cat - Display the contents of a file

Alias: alias cat='bat'

Description: The alias cat displays the contents of a file using the bat command, which provides syntax highlighting and line numbers.

  1. vi - Open a file in vi editor

Alias: alias vi='vim'

Description: The alias vi opens files in the vim editor, which is more feature-rich than the default vi editor.

  1. which - Display the location of an

 

Previous Post Next Post