LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to define alias in liux (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-define-alias-in-liux-866127/)

vishwajeet 03-02-2011 11:11 PM

How to define alias in liux
 
please reply. it's urgent

corp769 03-02-2011 11:32 PM

http://tinyurl.com/4w6p575

Please do not use words such as urgent next time. Saying that pretty much makes us NOT want to reply. Thanks for understanding,

Josh

vishwajeet 03-03-2011 12:27 AM

alias in linux
 
with the help of following command we can create alias of linux command
alias <alias_name>="<alias_value>"
e.g
alias goto="cd/home/vishwajeet/database/"

when we type "goto" at the shell prompt then it will change the pwd to /home/vishwajeet/database/

The alias created above is temporary and exits only for the current seesion.
To make it work permanently we should add this alias to .bash_profile file.
cd /root
vim .bash_profile
alias goto="cd/home/vishwajeet/database/"
~
~
:wq

Ignotum Per Ignotius 03-03-2011 06:32 AM

...Um, what's the question? :(

Vishwajeet, is your second post the solution to your original problem? If it is, mark the thread as [SOLVED] --- if you're logged in, you'll see the relevant link at the top of the thread.

Thanks!


All times are GMT -5. The time now is 10:45 PM.