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 09-03-2003, 10:01 AM   #1
davee
Member
 
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Rep: Reputation: 30
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
 
Old 09-03-2003, 10:08 AM   #2
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
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.
 
Old 09-03-2003, 10:36 AM   #3
davee
Member
 
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Original Poster
Rep: Reputation: 30
Thanks for that... does that mean 'service' is a script file?

Dave
 
Old 09-03-2003, 10:40 AM   #4
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
Yes. I don't think it comes with all distributions. It's a more complex script than one would think...

cheers
 
Old 09-04-2003, 03:43 AM   #5
davee
Member
 
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Original Poster
Rep: Reputation: 30
...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
 
Old 09-20-2003, 09:07 PM   #6
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 459

Rep: Reputation: 30
Thats the first thing I missed when I installed SuSE 8.2

I use it all the time on my RH install.
 
Old 03-06-2008, 12:40 AM   #7
sivaprakash123
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
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 !!!
 
Old 03-15-2013, 10:10 PM   #8
aravind162
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
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
 
Old 03-16-2013, 12:54 AM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,582

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by davee View Post
...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...
 
Old 03-16-2013, 01:34 AM   #10
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 870
Blog Entries: 2

Rep: Reputation: 219Reputation: 219Reputation: 219
Quote:
# rpm -qf /sbin/service
aaa_base-12.1-534.113.1.x86_64
The other thing involved is "chkconfig" or "systemctl" or both.
 
  


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
"service __ restart" bash command isn't working case1984 Linux - Newbie 9 04-10-2008 03:35 PM
Command to restart httpd service deWin Linux - Software 2 07-13-2004 07:17 PM
-bash: service: command not found Labyrinth Slackware 1 05-12-2004 08:13 AM
command to restart services djc Linux - Newbie 3 03-31-2004 03:04 PM
How do I restart services in Linux rytskyo Linux - Newbie 3 05-06-2002 08:27 AM


All times are GMT -5. The time now is 10:48 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration