UNIX help

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

  Hello everyone, Can anyone help me to create premanent alias in UNIX? It will be a great help. Thank you.

Comp · Feb 18, 2012 8:29 PM · 12,601 views

5 Replies

Do the following steps: 1. cd 2. vi .bashrc 3. alias command='aliasofcommand' 4. save and quit (:wq!) 5. exit and login again. If this doesnot work for you then apply the same steps for .bash_profile 2. vi .bash_profile This will create permanent alias for you. Last edited: 18-Feb-12 11:27 PM

jhapaliketo · Feb 18, 2012 11:09 PM

www.computerhope.com/unix/ualias.htm may this will help you.

monkyyou · Feb 18, 2012 11:37 PM

save the alias in .cshrc file it will create a permanet alias

khoikkhoik · Feb 19, 2012 8:27 AM

 Comp, depends on what shell you're running. Bash is most common (comes default with ubuntu, archlinux) and for that you need to add the alias to ~/.bashrc OR a better way would be to add it to ~/.bash_aliases given that you have sourced ~/.bash_aliases from your bashrc.  Everytime you invoke the shell, bash checks the bashrc file to see what configuration defaults to start with and if you have your alias set there, then it uses that too.  So in your .bashrc or your .bash_aliases (i keep mine in aliases cuz i have a tonne of them and so makes it easier to manage) you set your alias like you would normally with alias [your-alias-name] = "[whatever]" Once you've saved your file, you can use the 'source' command to reload your configs like so: source ~/.bash_aliases (or whatever file u wrote into).

Cacophonix · Feb 19, 2012 1:39 PM

Thank you Everyone for quick reponses.   I was also wondering if we can make alias without using assign operator. I know we can make it on C shell but what about bash.

Comp · Feb 19, 2012 3:02 PM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all