LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
  Search this Thread
Old 02-18-2004, 12:08 PM   #1
lozz1978
Member
 
Registered: Jan 2004
Location: Sunny UK
Distribution: Slackware 9.1
Posts: 53

Rep: Reputation: 15
Command promt question


This is hard for me to explain as im not quite sure what im on about, here goes,

At the moment for me to start amsn from a promt i have to type the full path. [piresl@localhost piresl]$ msn/msn/amsn

what i want to be able to do is, just type amsn at the promt instead of typing the complete path,

I guess i have to create a link (sym link) to some directory, but im not sure which one ?

can anyone help me ?

cheers
 
Old 02-18-2004, 12:15 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
read this little article
and when you get to the part about adding another directory after the colon : you will add:

/home/piresl/msn/msn/

if that is in fact the directory structure, although i can't see why you have two msn directorys .... but if that is how you got it, then thats what you will add ...

and if you did want to make a symlink to amsn in your home folder, then while in your home folder (/home/piresl) you can type :
ln -s msn/msn/amsn amsn

Last edited by DrOzz; 02-18-2004 at 12:16 PM.
 
Old 02-18-2004, 12:17 PM   #3
mwerle
LQ Newbie
 
Registered: Feb 2004
Location: London,UK
Distribution: Debian
Posts: 2

Rep: Reputation: 0
To see your current search path, type: echo $PATH

You have 3 options:
1) Copy the executable in a directory on your path (usually if it's not a distribution-specific program but should be shared amongst all users on the machine this would be /usr/local/bin) - this has to be done as the 'root' user. (eg: cp <full path of executable> /usr/local/bin)
2) Symlink the executable to a directory in your path (same notes as for (1) but using ln -s <full path of executable> /usr/local/bin)
3) Edit your path to include the directory where the executable is (eg for bash shells: export PATH=$PATH:<directory where your file is> - note that it has to be the fully qualified path, not a relative path) You can automate this step by editing your shell configuration file (for bash, this is ~/.bash_profile) so that your path is set every time you log in.

Cheers,
Micha.
 
Old 02-18-2004, 12:27 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
I guess that you are in your home directory where you enter that command, (pwd will clear that up), so likely, the exact commands below will work.

If you want any user to be able to execute it...
su - root
<enter password>
ln -s /home/piresl/msn/msn/amsn /usr/bin/amsn

otherwise, just for piresl,
open a console
cp .bash_profile .bash_profile_orig
pico .bash_profile (note any text editor to open the file)
navigate to the line like
PATH=$PATH:$HOME/bin
and change it to
PATH=$PATH:$HOME/bin:$HOME/msn/msn

NOTE: other users will not be able to run this unless they have access to your directory. If only you, it is a don't care. Why did you install it there instead of as root in /usr/bin or /usr/local/bin?

R.O.
 
Old 02-18-2004, 01:02 PM   #5
lozz1978
Member
 
Registered: Jan 2004
Location: Sunny UK
Distribution: Slackware 9.1
Posts: 53

Original Poster
Rep: Reputation: 15
I created a sym link in /usr/bin/ pointing to /home/me/msn/msn/amsn


this seemed to work for me, thanks again


lozz

Last edited by lozz1978; 02-19-2004 at 06:53 AM.
 
  


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
Promt for a scanner lazo Linux - Hardware 0 11-03-2004 02:08 PM
how can i read pdf in command promt? hansi umayangan Linux - Software 1 09-04-2004 07:19 AM
GNOME desktop to Command promt??? AZIMBD03 Red Hat 6 03-03-2004 11:13 AM
Command Promt nerofiend Linux - Newbie 6 03-02-2004 05:55 PM
how to browse files from command promt snoop24 Linux - Newbie 2 09-15-2003 12:28 PM


All times are GMT -5. The time now is 12:01 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