Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
hi all, i ve had a look around and cant seem to find what im looking for so ive come here for help. my question is; how do i go about defining where bash looks for binary executable files when you type just the name in on a command line? example: as a user, if i type gaim it launches gaim automatically, even though gaim is in /usr/local/bin. the reaso i ask this is because for some reason im not sure about, when im root and i type commands it wont look in the same places it would as when im in my normal user account.
my ultimate aim is to add /usr/local/sbin/ to roots path
as far as i understand that would add /usr/local/sbin to $PATH, though im not sure where $PATH is initially defined, where would that be? it seems by default the path for my account 'mick' includes /usr/bin, /usr/local/bin etc but root is very restritive and only seems to include /sbin type directories
also i dont have /etc/profiles or .bashrc; would it be possible to explain how profiles is structured? i.e a directory or a file and what advantages/disadvantages it has over the .bashrc file. also im presuming .bashrc would be located in my home or root dir (respectively)?
sorry for all the questions, only reason is i really like knowing why more than how :P (though i guess the why would be ponitless without the how!)
Last edited by mep]-[isto; 11-19-2003 at 07:22 PM.
The command export PATH=$PATH:/usr/local/sbin adds /usr/local/sbin to current PATH. The PATH variable is usually defined in /etc/profiles. The command looks like this export PATH=/bin:/usr/bin:/sbin:/usr/sbin
There can be more directories. When you don't use $PATH inside it's definition (after =), the old one is deleted and the directories listed (separated by : as you can see) in the command are used.
A common mistake is adding new directory to PATH this way:
The problem is that it deleted the old PATH, so only /usr/local/sbin would be in it, making the system use hard.
To add any other directory, just use something like
or, if you have more dirs to add
/etc/profiles defines PATH for all users. If you change something here, all users will be affected. On the other hand, /home/yourlogin/.bashrc is your own, private file. If you add such a line here, only your PATH will change.
thanks mara, and all who replied! good info nice to hear people explaining things aswell. i think the thing i enjoy most about linux is udnerstanding it, not just knowing to do this and that and when asked why i think...hmm, i dont know.
thanks to all! oh and btw this is a damn fine forum, good ppl offering good help!
i just had a look in my /etc directory and couldnt find profiles, the cloest thing i found was profile.d (a directory), is this what im looking for? if not...what is this? and if this isnt it, is profiles a file or directory?