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.
I'm using rh9. sometimes i get command not found or unkonwn when i try and use commands like"service" or "ifconfig" . I dont know whats wrong . sometimes it works and then it dosent for some reason. I notice this happends at school at well. is there anyone else who has this problem?
heres it from my screen:
[ninja@P1 ninja]$ service
-bash: service: command not found
[ninja@P1 ninja]$ ifconfig
-bash: ifconfig: command not found
[ninja@P1 ninja]$ [ninja@P1 ninja]$
-bash: [ninja@P1: command not found
this is very weird .. i have no idea what is going on.
its becouse users usally dont have access to full path's in linux thats why you need to write the full PATH for example "/sbin/ifconfig" or "/sbin/route" unless ur loging as root or editing the path's for ur user ull have to write down full path now to learn about path's just do "info path" or if u simply want to edit ur paths trough the console the command form is :
PATH=$PATH:/folder/folder1 <- to add search path as last from right
PATH=/folder/folder1:$PATH<- to add search path as last from left
u might have to edit this paths as roots also the path's are being searched from the left to the right.
damn i dont know whats going on.. i log in as root and the service command works now.. i dont know why it wouldnt work before. sorry if this seems like a dumb question but its been bothering me for weeks. it happends and then works fine again.
However, *some* of those commands, eg ifconfig, may be used by users but live in the /sbin directory. Root gets /sbin included as part of his path, common users don't. You might try typing /sbin/<command> and seeing if that works before going the su route. Of course you will have to remember on a command-by-command basis which commands require root and which require /sbin (and which live in /bin and don't require either).
Distribution: SuSE Pro Releases 7.3, 9.0, CentOS 4.0, Kubuntu 6.0x
Originally posted by sonesay thanks for your reply sbogus .. but I have tried those commands as root .. same problem. i used the su command to change and entered my root password. .. this is really really weird.
well then, try to locate where these commands are installed. As tiger7007 says, it could be that you do not have in your PATH environment the full paths to these scripts/executives.
As root, type in whereis service and see what you get as result. If you get nothing (i.e. a line like service:) then some wrong settings in the bash environment or general installation errors might be occured. Try to list each directory know to have executables in it. Try
ls -lha /bin
ls -lha /usr/bin
ls -lha /usr/sbin
If whereis command goves you some full path to "service" then you might want to try it using the given full path.