LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2005, 03:37 AM   #1
quintan
LQ Newbie
 
Registered: Aug 2005
Posts: 11

Rep: Reputation: 0
Can I make an alias?


In Linux, is there a way to make, I'm not sure what to call them, an alias in a directory, that links to directories I often visit, so I don't have to often type in the full path everytime I visit?
 
Old 11-25-2005, 03:42 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You can make an alias like this:

alias cd2dir='cd /path/to/dir'

After entering the above command you can go to /path/to/dir by typing cd2dir.
cd2dir can be anything, as long as it is one word.

If you like this, put the command in your .profile (or .bash_profile)
 
Old 11-25-2005, 03:44 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What you mean is called "symbolic link" or abbreviated symlink. You can make one by running:
Code:
ln -s /path/to/directory /alias
 
  


Reply



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 make an alias? Gins Linux - General 6 06-06-2005 07:13 PM
How to make alias of 'ls' in winxp/dos servnov General 4 11-04-2004 08:39 PM
make an alias in winXP zchoyt Linux - General 2 09-14-2004 08:33 AM
Make symbolic link or alias gubak Linux - Newbie 5 08-20-2004 12:50 PM
How do i make an alias on my webserver? meluser Linux - Software 14 03-13-2003 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:23 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration