LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 09: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, 09:08 AM   #2
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
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.
 
1 members found this post helpful.
Old 09-03-2003, 09: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, 09:40 AM   #4
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
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, 02: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, 08:07 PM   #6
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

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

I use it all the time on my RH install.
 
Old 03-05-2008, 11:40 PM   #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, 09: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-15-2013, 11:54 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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, 12:34 AM   #10
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
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 02:35 PM
Command to restart httpd service deWin Linux - Software 2 07-13-2004 06:17 PM
-bash: service: command not found Labyrinth Slackware 1 05-12-2004 07:13 AM
command to restart services djc Linux - Newbie 3 03-31-2004 02:04 PM
How do I restart services in Linux rytskyo Linux - Newbie 3 05-06-2002 07:27 AM

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

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