How To Refresh A Service In Ubuntu
As a Linux administrator, nosotros often need to showtime, end, reload and practice other actions to system services. For those new to Linux, here's the how to tutorial for Ubuntu 20.04 Server or Desktop.
What does system services do:
System services are the software processes running silently in the background. They practise various jobs, such equally media streaming, web serving, and remote network login in the host server without graphical interface. However, they serve remote clients with spider web pages (using east.1000., Apache, Nginx), online YouTube videos and or Spotify musics.
Start, Terminate, or Restart Services in Ubuntu Linux:
Since Ubuntu 18.04, systemd daemon takes the identify of init.d
to human activity as organization and service director. And other Linux Distributions, e.g, Debian, CentOS and Fedora, they all apply systemd equally organization service manager.
Manage services via systemctl command:
Systemctl is the command line tool to control the systemd service managing director. Information technology provides following commands to do commonly actions.
Note: In the commands below, replace <Service_Name> with your serivce, eastward.g., SSH, apache, php, etc. "sudo" is required if you're working on Ubuntu Server with non-root user.
ane. To starting time a system service:
sudo systemctl start <Service_Name>
2. To terminate a service:
sudo systemctl stop <Service_Name>
iii. To reload a service after irresolute its configuration:
sudo systemctl reload <Service_Name>
4. To restart a service (will commencement service if non yet running):
sudo systemctl restart <Service_Name>
five. And check the service status:
All the previous commands mostly do not output anything, and then you may check the service status past running control:
sudo systemctl condition <Service_Name>
To quit the command, printing Ctrl+C on keyboard
As yous see, the command is but "systemctl <Action> <Service_Name>". Where "<Action>" is unremarkably start, end, reload, restart, and condition.
There are more deportment, such every bit try-restart will restart service simply when it'south already running; reload-or-restart volition reload if supported or restart (start if non even so running); endeavour-reload-or-restart will reload if supported or restart (do aught if not all the same running); and kill, clean, is-activity, is-failed and more.
Manage services via service command:
The service
is an "high-level" command to manage organization services. It redirects to systemctl
in contempo Linux systems.
This usage is a little scrap different. It places service identify in the first then the actions.
service <Service_Name> <Action>
And then, we can start, end, and restart services (SSH for instance) via service ssh beginning
, service ssh stop
, service ssh restart
, and service ssh status
. Likewise, sudo is required for not-root user.
Summary
In short, Ubuntu and other Linux server may manage system services via systemctl
control: "systemctl <Action> <Service_Name>
". By replacing <Activity> with starting time, restart, terminate, reload or status will practice relevant action to the specified service.
Source: https://fostips.com/start-stop-restart-services-ubuntu-20-04/
Posted by: henryresprommed.blogspot.com
0 Response to "How To Refresh A Service In Ubuntu"
Post a Comment