LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 04: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, 04:42 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
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, 04:44 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,900

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


Reply


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

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

All times are GMT -5. The time now is 07:22 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration