All about Information Technology!

service

Start or Stop Linux Service

Start a service: sudo service apache2 start or sudo /etc/init.d/apache2 start Stop a service: sudo service apache2 stop or sudo /etc/init.d/apache2 stop

>>

, , ,

Check Status of Linux Service

To check if a local Linux service is running or not, open terminal window and paste the following command: /etc/init.d/service_name status for example /etc/init.d/apache2 status

>>

, , ,

Check Status of Windows Service

To check if a local or a remote Windows service is running or not, create a batch file, name it for ex. check_service.bat and paste the following code: @echo off sc \\localhost query Apache2.2 > service_status.txt Find /i "RUNNING" service_status.txt >> service_status.txt IF %errorlevel% == 0 ( echo service is running ) ELSE ( echo [...]

>>

, , , ,

Start or Stop Windows Service using batch file

Start Windows Service Open notepad and create a new file named for ex start_my_service.bat. Paste in file the following lines: @echo off echo "starting my_service" net start "my_service" echo "done" @echo on   pause Save the file, right click on it and select “Run as administrator..” to run it! Stop Windows Service Open notepad and [...]

>>

, , , , , , , , ,

Delete System Service in Windows 7

Before you delete any service you have to know its real name, not the displayed one. 1. Open services by executing: services.msc 2. Locate your desired service for deletion 3. Right click on it and select Properties 4. On Tab General, there is a field called Service Name. That’s the name that you will provide [...]

>>

, , , , , , ,