Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-02-2011, 11:11 PM   #1
LQ Newbie
Registered: Aug 2008
Posts: 5

Rep: Reputation: 0
Question How to define alias in liux

please reply. it's urgent
Old 03-02-2011, 11:32 PM   #2
LQ Guru
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002

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

Old 03-03-2011, 12:27 AM   #3
LQ Newbie
Registered: Aug 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Lightbulb alias in linux

with the help of following command we can create alias of linux command
alias <alias_name>="<alias_value>"
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/"
Old 03-03-2011, 06:32 AM   #4
Ignotum Per Ignotius
Registered: Sep 2009
Location: Wales, UK
Distribution: Slackware
Posts: 69
Blog Entries: 3

Rep: Reputation: 42
...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.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to define custom alias in Ubuntu ? Yan_Suryana Linux - Newbie 6 12-17-2009 08:32 PM
Is there liux software that can do this robrecc Linux - Software 4 01-27-2006 10:01 AM
define alias permanently RajRed Linux - General 4 11-19-2005 08:40 AM
boot to to liux from ipod as hardrive secret_squirrel Linux - General 3 04-18-2005 04:55 PM
Stuck on Box running Liux jeep99899 Linux - Newbie 4 02-15-2005 02:10 PM

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration