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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-03-2003, 09:01 AM
|
#1
|
|
Member
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 262
Rep:
|
Restart services - 'service' command not found
I've installed LInux at work - one thing I'm missing is 'service' to restart net services etc... Where can I get this? Should it be missing?
Dave
|
|
|
|
09-03-2003, 09:08 AM
|
#2
|
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
you can restart services by
/etc/init.d/service-name restart (status, stop and start work too).
look in /etc/init.d/ for the services available.
|
|
|
|
09-03-2003, 09:36 AM
|
#3
|
|
Member
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 262
Original Poster
Rep:
|
Thanks for that... does that mean 'service' is a script file?
Dave
|
|
|
|
09-03-2003, 09:40 AM
|
#4
|
|
LQ Addict
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661
Rep:
|
Yes. I don't think it comes with all distributions. It's a more complex script than one would think...
cheers
|
|
|
|
09-04-2003, 02:43 AM
|
#5
|
|
Member
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 262
Original Poster
Rep:
|
...and obviously not SuSE 8.2! I wish it was, as it's a hell of an easier to remember/type than /etc/inet... etc etc
Thanks again,
Dave
|
|
|
|
09-20-2003, 08:07 PM
|
#6
|
|
Member
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/11/13.37/14 RedHat 6.2/7 SuSE 8.2/11.1
Posts: 358
Rep:
|
Thats the first thing I missed when I installed SuSE 8.2
I use it all the time on my RH install.
|
|
|
|
03-05-2008, 11:40 PM
|
#7
|
|
LQ Newbie
Registered: Mar 2008
Posts: 1
Rep:
|
Im using Fedora7 here the service is /sbin/service you can add it to environment variables like this
>PATH=$PATH:/sbin
this will work
GOOD LUCK !!!
|
|
|
|
03-15-2013, 09:10 PM
|
#8
|
|
LQ Newbie
Registered: Mar 2013
Posts: 1
Rep: 
|
service command not found
if the package is installed from source code, service command wont work. service command will work only if you have installed the package using yum or rpm command.
Also you can check path of the commands using
$ echo $PATH
Sample outputs:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/home/vivekgite/bin
Usually, all user commands are in /bin and /usr/bin or /usr/local/bin directories. All your programs are installed in these directories. When you type the clear command, you are running /usr/bin/clear. So if it is not in your path try to add directories to your search path as follows (setup Linux or UNIX search path with following bash export command)
$ export PATH=$PATH:/bin:/usr/local/bin
You can also find out of path of any command with which or whereis commands:
$ which ls
And last but not least, linux is case sensitive. so make sure the case you are using is the right one ( silly mistake.but still can make problems)
thank you
|
|
|
|
03-15-2013, 11:54 PM
|
#9
|
|
Senior Member
Registered: Dec 2005
Posts: 1,369
Rep: 
|
Quote:
Originally Posted by davee
...and obviously not SuSE 8.2! I wish it was, as it's a hell of an easier to remember/type than /etc/inet... etc etc
Thanks again,
Dave
|
The "service" command is something that RedHat came up with years ago. It is not used in most distros. If you wish to use the service command instead of the above /etc/init.d/ commands then use Fedora, but even that is changing with their new systemd setup. service does still work for most basic commands like network, etc...
|
|
|
|
03-16-2013, 12:34 AM
|
#10
|
|
Member
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,OpenBSD
Posts: 496
Rep: 
|
Quote:
# rpm -qf /sbin/service
aaa_base-12.1-534.113.1.x86_64
|
The other thing involved is "chkconfig" or "systemctl" or both.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:16 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|