LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-09-2001, 02:05 PM   #1
Carel
LQ Newbie
 
Registered: Apr 2001
Location: Pasadena, CA
Posts: 3

Rep: Reputation: 0
Question


I installed Linux last week and got a few Linux books.
Have not been able to find info on how program "paths" are handled. In DOS one either has to be in the directory where the program resides or one has to specify a path in the autoexec.bat file. Could someone please direct me to some info on how this works in Linux?
 
Old 04-09-2001, 02:28 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Usually you type the full path of where the program resides or if your in the directory already. You can also create aliases and such.
Most of the time, I am in the directory on which the program is in and type ./program-name-here

Hope this helps.
 
Old 04-09-2001, 09:39 PM   #3
Carel
LQ Newbie
 
Registered: Apr 2001
Location: Pasadena, CA
Posts: 3

Original Poster
Rep: Reputation: 0
Question

Thanks for that explanation. I am still a little bit mystified though: For instance the command mkbootdisk is in the directory /sbin, but when I am in the root-directory it will run anyhow. So is there some equivalent of a DOS "path" command in Linux?
 
Old 04-10-2001, 07:28 AM   #4
Copenhagen Cowboy
Member
 
Registered: Mar 2001
Location: D/FW
Posts: 75

Rep: Reputation: 15
The reason it will run from the root directory is because it is already set as an alias. You can check for sure by typing "alias" at the prompt.
 
Old 04-11-2001, 06:03 AM   #5
NGene
Member
 
Registered: Mar 2001
Location: Turku, Finland
Distribution: Ubuntu
Posts: 66

Rep: Reputation: 16
There is a file where the PATH and aliases are specified. It may be a file called .bashrc or .bash_profile in your home directory, or it can be /etc/bashrc. I'm posting this from a Winblows machine so I can't check for the exact file name but I think it's one of these.
 
Old 04-11-2001, 10:57 AM   #6
Carel
LQ Newbie
 
Registered: Apr 2001
Location: Pasadena, CA
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks to the three above who answered. That explains most of it. I am still curious though, how the root knows if it should look for .bash_profile or /etc/bashrc. There has to be SOMETHING that specifies where root should look...? Or does it first look for .bash_profile and if that is not there it looks for /etc/bashrc. I am trying to get some basic understanding for the mechanics here. Because I don't know how this stuff works under Linux, I had to spend a lot of time to figure out that giving a command from the /root is different from doing it from root@localhost /root. (I still don't know why). I could not get mkbootdisk to work from root@localhost but finally got it to work by logging in at the root. If this sounds confused it is because I 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
[SOLVED] rm files only - retain directory structure schneidz Programming 15 05-30-2013 04:08 PM
How to copy an entire directory structure except certain files? thanhvn Programming 9 01-27-2012 11:41 AM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 06:05 AM
HELP! installing 9.0 from HD, what files do i transfer in what directory structure? diabolik808 Red Hat 1 01-30-2005 03:47 PM
Does Linux have a Program Files directory? aznluvsmc Linux - Newbie 4 08-24-2004 08:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 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
Open Source Consulting | Domain Registration