Welcome to the most active Linux Forum on the web.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 11-30-2003, 05:22 PM   #1
Registered: Jun 2003
Distribution: FreeBSD
Posts: 119

Rep: Reputation: 15
Executing commands without using the full path..

If I type startx or aterm in any directory or any terminal it will load. But for programs like mozilla I have to type out the full path to start it. I heard there is a place to put these paths to make them executable with just the program name but I dunno what it's called so wading thru the handbook and docs I'm not even sure what I'm looking for. Does this make sense? I'm still a bit noobish so I hope it does. Thx in advance.
Old 11-30-2003, 05:49 PM   #2
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
You're talking about the PATH environment variable. It can be set in the profile for your shell. For sh/ksh (and bash too, under certain circumstances) that would be ~/.profile. bash normally checks for ~/.bash_profile first and uses that if it exists. csh uses ~/.login.
Old 12-02-2003, 07:16 PM   #3
Registered: Jul 2003
Distribution: Red Hat
Posts: 94

Rep: Reputation: 15
Well, if it's a binary or a script of any kind and it's located in one of the directories listed in $PATH , u just need to rehash so you can call that program/script without using the full path.


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
executing shell commands in c++ true_atlantis Programming 2 10-01-2004 04:53 PM
Executing Linux commands in C programs--->please help dennyvm Programming 3 01-15-2004 10:51 AM
Executing commands in Konsole... meteotrade Linux - General 5 10-20-2003 06:34 PM
Executing commands with child process benjaminrtz Programming 5 12-18-2002 03:42 PM
Executing commands on startup viciousfish Linux - General 5 06-28-2002 02:15 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:03 PM.

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