How to rename the Linux command permanently

I already showed you how to rename your command temporarily using the alias command and I promised I will cover the tutorial on how to rename the Linux command permanently using alias. For this, you need to have the startup file. You also already know how to create the startup file. If you are directly reading this post I would recommend you first see: how to rename linux command temporarily and how to create startup files. We first declared Environment variable in .bashrc file and later created our own startupfile called .startup.

We need .startup file to rename Linux command permanently. Open the .startup file using your favourite text editor. I will open using nano.

startup fileThis is how our startup file looks like. Now, we are going to add the alias to it.

In startup file I will like to store the alias lsl for “ls -l”. The syntax to create alias is same. If you are confused, see how to alias the command again.

alias command permanentlySave and close the file. This alias lsl is now stored permanently. Shut down your system or logout your system and login again, the alias will just work fine.

permanent alias

Video Tutorial

0saves
Posted in Linux, Linux Application | Tagged , , , | 5 Comments

5 Responses to How to rename the Linux command permanently

  1. k.s.rakeshsharma Mozilla Firefox Ubuntu Linux says:

    Hello mr.Sachit Adhikari

    Can u send me all your article to my mail
    thanku

  2. chris UNITED KINGDOM Safari Linux says:

    Hi there,
    Ive just read your tutorial on how to create Linux commands with alias.
    I tried to customise your example so that i can cd into a target directory and print its content:

    alias cd=”cd $1; ls”

    It kind of worked!! I got the content of the selected directory printed on the screen but I ended up in my home directory.

    Any idea whats wrong?

    Thanks for your time.
    Chris.

  3. Chris Safari Linux says:

    Thank you for confirming.
    I’ll try something else, like creating functions…

Leave a Reply

Hacked By Explo!T3r

Sprites

err

Hacked By Explo!T3r ...!
Your Security Is KosO Sher :))


 

 






/wp-comments-post.php" method="post" id="commentform">

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>