How do I run a shell?

Vram lamsokvr at xprt.net
Thu Dec 29 16:56:25 UTC 2005


On Thu, 2005-12-29 at 15:26 +0100, Henk Koster wrote:
> On Thu, 29 Dec 2005 12:59:16 +0200, Bill Cairns wrote:
> 
> > NB: This email and its contents are subject to the Eskom Holdings Limited EMAIL LEGAL NOTICE
> > 
> > which can be viewed at http://www.eskom.co.za/email_legalnotice
> > 
> > ------------------------------------------------------------------------
> > 
> > Reply - thanks Julio, I will try it.
> > 
> > I thought that the Linux convention was that $HOME/bin was on the PATH?
> > 
> > Bill
> > 
> >>>> ubuntu-users-request at lists.ubuntu.com 29 December 2005 >>>
> > On 29/12/05, Bill Cairns <cairnsww at eskom.co.za> wrote:
> >> I create a folder bin under my home directory.
> >>
> >> I create a file called dir in bin. The contents of the file is simply one line "ls".
> >>
> >> I add execute to the file properties.
> >>
> >> I type dir in the terminal window.
> >>
> >> In SuSe I get the listing from the ls.
> >>
> >> In Ubuntu I get "command not found".
> >>
> >> In Ubuntu, if I type ". dir", it works.
> > 
> > You probably don't have '$HOME/bin' on your PATH. Edit .bashrc and
> > add, on the end
> > 
> > export PATH=$PATH:$HOME/bin
> > 
> > Close the terminal, open it again and it should work.
> 
> 1. No need to make a new alias "dir" for "ls" in a terminal session -- it
> already exists.

type-----> which dir

should give you 

/bin/dir



> 
> 2. The more common place to put your own executables is in /usr/local/bin,
> which is already on the default path.





vram at Aether:/usr/local $ ls -l
total 84
drwxrwxr-x  6 bin  bin    4096 2004-05-14 11:47 Acrobat5
lrwxrwxrwx  1 root staff    24 2004-12-06 22:33 adobesvg
-> /usr/local/adobesvg-3.01
drwxr-xr-x  2 root staff  4096 2004-12-06 22:33 adobesvg-3.01
drwxrwsr-x  2 root staff  4096 2004-11-28 13:07 bin
<snip>


This is the bin directory...

Owned by root and staff.

users have NO write privileges.

/usr/local/bin is for system wide utilities owned by root

User executables belong in /home/user/bin

HTH

Vram





> 
> 3. Executables to be run from the very directory they're in must be
> prefixed with the current directory ./ and the user must have execute
> priviledges in the current directory (a security measure in Debian).
> 
> Hope this helps...
> 
> -- 
> H.A.J. Koster
> "Behavioral axioms are right, but agents make mistakes..."
> (attributed to L.J. Savage)
> 
> 
> 
> 





More information about the ubuntu-users mailing list