LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
LinkBack Search this Thread
Old 03-02-2011, 11:11 PM   #1
vishwajeet
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
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
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
 
Old 03-03-2011, 12:27 AM   #3
vishwajeet
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>"
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
 
Old 03-03-2011, 06:32 AM   #4
Ignotum Per Ignotius
Member
 
Registered: Sep 2009
Location: Wales, UK
Distribution: Slackware
Posts: 67

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


Reply

Tags
shell


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 02:14 PM.

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