Linux Service Control Commands

As a Linux administrator, one task you will most certainly be required to know is the controlling of services via the command line. Because many of the servers you will work with will be headless, the services contained within won’t have a GUI app to help you out. So when the likes of Apache, NGINX, MySQL and Docker need to be started, restarted or stopped, you’re going to need to have this skill in your back pocket.

Jack Wallen, writing for TechRepublic Premium, looks at some of the ways you can control the start, stop and restarting of services with the Linux operating system.

    Featured text from the guide:

    The first command we’ll look at is systemctl, a tool that can work with just about any service on your system. First off, systemctl must be run with admin privileges. So if you’re working with a distribution that uses sudo, you’ll always use systemctl with the sudo command.

    If your distribution doesn’t use sudo, you’ll have to first change to the root user with the su command. The basic command structure of this tool is:

    sudo systemctl ACTION SERVICE

    Where ACTION is the action you want to take and SERVICE is the service you want to work with. An action can be start, stop, restart, reload, enable or disable. A service can be any server installed, such as apache2, mysql or docker. It’s important to understand the difference between the actions.

Improve your knowledge of Linux with our 11-page guide document. Previously priced at $29, this is now available for download at just $9. Alternatively, enjoy complimentary access with a Premium annual subscription. Click here to find out more.

TIME SAVED: Crafting this content required 20 hours of dedicated writing, editing and research. Benefit from our expertise and elevate your understanding of Linux.

Subscribe to the TechRepublic Premium Exclusives Newsletter

Save time with the latest TechRepublic Premium downloads, including customizable IT & HR policy templates, glossaries, hiring kits, features, event coverage, and more. Exclusively for you! Delivered Tuesdays and Thursdays.

Subscribe to the TechRepublic Premium Exclusives Newsletter

Save time with the latest TechRepublic Premium downloads, including customizable IT & HR policy templates, glossaries, hiring kits, features, event coverage, and more. Exclusively for you! Delivered Tuesdays and Thursdays.

Resource Details

or

* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.

Provided by:
TechRepublic Premium
Published:
February 15, 2024
Topic:
TechRepublic Premium
Format:
WORD
or

* Sign up for a TechRepublic Premium subscription for $299.99/year, and download this content as well as any other content in our library. Cancel anytime. Details here.