RSS

create permanent alias eOS

08 Sep

Create a file name .bash_aliases in home directory
Then when we need to create a alias open that file in text editor(in my case: Gedit) with root privileges.

sudo gedit ~/.bash_aliases

then create whatever alias you want inside the text file
eg:
alias update="sudo apt-get update"
and save the text file.
as you may have noticed I assigned “update” to “sudo apt-get update”
now whenever I type in the command ‘Update’ on to the terminal it will run “sudo apt-get update”


In the latest versions of Ubuntu, ~/.bashrc automatically sources ~/.bash_aliases, so permanent aliases are best put into this file instead. previously we used to put permanent aliases on  ~/.bashrc

 
Leave a comment

Posted by on September 8, 2017 in Linux

 

Tags: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: