Science and technology

10 helpful Bash aliases for Linux

How many occasions have you ever repeatedly typed out an extended command on the command line and wished there was a method to put it aside for later? This is the place Bash aliases turn out to be useful. They will let you condense lengthy, cryptic instructions all the way down to one thing straightforward to recollect and use. Need some examples to get you began? No downside!

To use a Bash alias you have created, you want to add it to your .bash_profile file, which is positioned in your house folder. Note that this file is hidden and accessible solely from the command line. The best approach to work with this file is to make use of one thing like Vi or Nano.

10 helpful Bash aliases

  1. How many occasions have you ever wanted to unpack a .tar file and could not keep in mind the precise arguments wanted? Aliases to the rescue! Just add the next to your .bash_profile file after which use untar FileName to unpack any .tar file.
alias untar='tar -zxvf '
  1. Want to obtain one thing however be capable of resume if one thing goes mistaken?
alias wget='wget -c '
  1. Need to generate a random, 20-character password for a brand new on-line account? No downside.
alias getpass="openssl rand -base64 20"
  1. Downloaded a file and wish to check the checksum? We’ve received that coated too.
alias sha='shasum -a 256 '
  1. A traditional ping will go on endlessly. We don’t desire that. Instead, let’s restrict that to simply 5 pings.
alias ping='ping -c 5'
  1. Start an internet server in any folder you would like.
alias www='python -m SimpleHTTPServer 8000'
  1. Want to know the way quick your community is? Just obtain Speedtest-cli and use this alias. You can select a server nearer to your location by utilizing the speedtest-cli –list command.
alias velocity='speedtest-cli --server 2406 --simple'
  1. How many occasions have you ever wanted to know your exterior IP handle and had no thought find out how to get that information? Yeah, me too.
alias ipe='curl ipinfo.io/ip'
  1. Need to know your native IP handle?
alias ipi='ipconfig getifaddr en0'
  1. Finally, let’s clear the display screen.
alias c='clear'

As you’ll be able to see, Bash aliases are a super-easy approach to simplify your life on the command line. Want extra information? I like to recommend a fast Google seek for “Bash aliases” or a visit to GitHub.

Most Popular

breakingExpress.com features the latest multimedia technologies, from live video streaming to audio packages to searchable archives of news features and background information. The site is updated continuously throughout the day.

Copyright © 2017 Breaking Express, Green Media Corporation

To Top