AvoidErrors
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM
No Result
View All Result
AvoidErrors
No Result
View All Result

How to Restart Services from Linux Terminal

Abdelrahman Reda by Abdelrahman Reda
November 5, 2018 - Updated on November 6, 2018
in Linux
0
Share on FacebookShare on Reddit
Download this tool to Recover Deleted Photos

From this article, you will learn how to restart services in the Linux. This can be done with a few simple commands in any Linux distribution.

Open the Terminal. Most Linux distributions have a menu (in the lower left corner of the screen) in which the Terminal application is located. A Terminal is an analog of the Windows command line.

The user interface depends on the Linux distribution, so you may have to find the Terminal application inside one of the menu folders.

On some Linux distributions, the Terminal is displayed at the top or bottom of the screen.

Type the command to display a list of all active services.

Type ls /etc/init.d in the Terminal and press Enter.

Then you will see the list of running services and the corresponding command names.

Find the name of the service you want to restart.

Typically, the name of the service (for example, “Apache“) is displayed on the left side of the screen, and the name of the command (for example, “httpd” or “apache1” depending on the Linux distribution) is on the right side of the screen.

Type the command to restart the service.

Enter sudo systemctl restart service in the Terminal, where substitute the name of the service command for the service, and then press Enter.

For example, to restart Apache on Ubuntu, type sudo systemctl restart apache1 in the Terminal.

Enter the password when prompted.

Enter the superuser password, and then press Enter.

The service will be restarted.

If the service does not restart, type sudo systemctl stop service, press Enter, and then type sudo systemctl start service.

With the “chkconfig» command you can add and remove the service from the autorun.

To see a list of all active services, enter ps -A in the terminal.

Do not stop services that you do not know.

Remember that some services are necessary for stable operation of the system.

Previous Post

How to Setup DNS in Ubuntu

Next Post

Manually Restrict WordPress Admin Area Access to Specific I.P Address

Abdelrahman Reda

Abdelrahman Reda

Abdelrahman Reda is a Motivated Support Engineer with 6+ years of corporate and consumer support experience. His experience related to administration of Network, NOC support, computers and anti-virus server, data entry, networking sites, remote support.

Related Posts

Install ownCloud on Ubuntu 20.04 LTS DigitalOcean
Linux

Install ownCloud on Ubuntu 20.04 LTS DigitalOcean

by Miguel
June 21, 2022 - Updated on June 22, 2022
Completely Remove Windows 11 and Install Ubuntu
Linux

Completely Remove Windows 11 and Install Ubuntu

by Miguel
April 8, 2022

Subscribe to get weekly tutorials direct to your inbox!

Disable Windows Defender SmartScreen – Windows 11
Windows

Fix Windows 11 Defender Not Working

by Rhousse
January 24, 2023
How to Fix 503 Service Unavailable Error in Windows 10 
Windows

Fix HTTP Error 503: The Service is Unavailable in Windows 11

by Rhousse
January 24, 2023
How to Modify Mouse Pointer in Windows 10
Windows

How to Fix Black Screen With Cursor in Windows 11

by Rhousse
January 24, 2023
Restore the Old Windows Desktop Icons – Windows 11
Windows

Fix and Enable Drag and Drop on Windows 11

by Rhousse
January 24, 2023




  • Disclaimer & Privacy Policy
  • FAQ
© 2022 Powered by Cloudways
No Result
View All Result
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM

© 2022 AvoidErrors Powered by Cloudways | Privacy

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.