Saturday, April 26, 2014

service

  •   service command example
 
Service command is used to run the system V init scripts. i.e Instead of
calling the scripts located in the /etc/init.d/ directory with their full path,
you can use the service command.


Check the status of a service:

# service ssh status
Check the status of all the services.
service --status-all
Restart a service.
# service ssh restart

Related Posts:

  • uname   uname command examples Uname command displays important information about the system such as — Kernel name, Host name, Kernel release number, Processor type, etc., Sample uname output from a Ubuntu laptop is … Read More
  • tail   tail command example Print the last 10 lines of a file by default. $ tail filename.txt Print N number of lines from the file named filename.txt $ tail -n N filename.txt View the content of the file in real… Read More
  • unzip unzip command examples To extract a *.zip compressed file: $ unzip test.zip View the contents of *.zip file (Without unzipping it): $ unzip -l jasper.zip Archive:  jasper.zip   Length  &… Read More
  • whereis whereis command examples When you want to find out where a specific Unix command exists (for example, where does ls command exists?), you can execute the following command. $ whereis ls ls: /bin/ls /usr/share/… Read More
  • vim vim command examples Go to the 143rd line of file $ vim +143 filename.txt Go to the first match of the specified $ vim +/search-term filename.txt Open the file in read only mode. $ vim -R /etc/passwd   &nb… Read More

0 comments:

Post a Comment