AvoidErrors
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
133
VIEWS
Share on FacebookShare on Reddit
RECOMMENDED: Improve PC performance Migrate to Solid State Drive (SSD)

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

Completely Remove Windows 11 and Install Ubuntu
Linux

Completely Remove Windows 11 and Install Ubuntu

by Miguel
April 8, 2022
Remote Desktop Ubuntu 21.10 from Windows
Linux

Remote Desktop Ubuntu 21.10 from Windows

by Miguel
March 16, 2022 - Updated on April 16, 2022

Subscribe to get weekly tutorials direct to your inbox!

LATEST

Clean Install Windows 11 Without USB
Windows

Fix Lively Wallpaper Isn’t Working on Windows 11

by Rhousse
May 23, 2022
Fix Empty Startup Folder in Windows 11
Windows

Fix Empty Startup Folder in Windows 11

by Rhousse
May 23, 2022
How to Open Task Manager When It’s Disabled by the Administrator
Windows

How to Open Task Manager When It’s Disabled by the Administrator

by Rhousse
May 23, 2022
How to Enable Dark Mode on Windows 11
Windows

How to Manually Install Device Drivers on Windows 11

by Rhousse
May 23, 2022
  • Disclaimer & Privacy Policy
  • FAQ
© 2022 Powered by Cloudways
No Result
View All Result
  • HOME
  • WINDOWS
  • MAC OS X
  • 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.