{
	"id": "b161882e-e607-4803-8f25-5cb936dc02be",
	"created_at": "2026-04-06T00:06:09.385131Z",
	"updated_at": "2026-04-10T03:31:18.963462Z",
	"deleted_at": null,
	"sha1_hash": "243f299c316e1f8ba19d1befdeb914b05d1664b8",
	"title": "How to use systemctl to manage Linux services",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 66002,
	"plain_text": "How to use systemctl to manage Linux services\r\nBy Damon Garn\r\nPublished: 2022-04-21 · Archived: 2026-04-05 23:40:37 UTC\r\nSuppose you're making configuration changes to a Linux server. Perhaps you just fired up Vim and made edits to\r\nthe /etc/ssh/sshd_config file, and it's time to test your new settings. Now what?\r\nServices such as SSH pull their settings from configuration files during the startup process. To let the service\r\nknow about changes to the file, you need to restart the service so that it rereads the file. You can use the\r\nsystemctl command to manage services and control when they start.\r\nRestart a service\r\nAfter editing the /etc/ssh/sshd_config file, use the systemctl restart command to make the service pick up\r\nthe new settings:\r\n$ sudo systemctl restart sshd\r\nYou can verify the service is running by using the status subcommand:\r\n$ sudo systemctl status sshd\r\nStop and start a service\r\nPerhaps while troubleshooting you need to stop a service to determine whether it is the culprit or interfering with\r\nsome other process. Use the stop subcommand for this:\r\n$ sudo systemctl stop sshd\r\nOnce you determine if this service is associated with the issue, you can restart it:\r\n$ sudo systemctl start sshd\r\nWhile the restart subcommand is useful for refreshing a service's configuration, the stop and start\r\nfeatures give you more granular control.\r\nControl whether the service starts with the system\r\nhttps://www.redhat.com/en/blog/linux-systemctl-manage-services\r\nPage 1 of 3\n\nOne consideration with using stop and start is that the two commands apply only to the current runtime. The\r\nnext time you boot the system, the service will either start or not start, depending on its default settings. You can\r\nuse the enable and disable subcommands to manage those defaults.\r\nWhen you disable the service, it doesn't start the next time the system boots. You might use this setting as part\r\nof your security hardening process or for troubleshooting:\r\n$ sudo systemctl disable sshd\r\nReboot the system with reboot sudo systemctl reboot , and  the service won't automatically start.\r\nYou may determine that you need the service to start automatically. In that case, use the enable subcommand:\r\n$ sudo systemctl enable sshd\r\nThe enable subcommand doesn't start a service, it only marks it to start automatically at boot. To enable and\r\nstart a service at the same time, use the --now option:\r\n$ sudo systemctl enable --now sshd\r\n[ Free download: Advanced Linux commands cheat sheet. ]\r\nMask a service\r\nYou can manually start a disabled service with the systemctl start command after the system boots. To prevent\r\nthis, use the mask subcommand. Masking the service links its configuration to /dev/null . A user or process\r\nwill not be able to start this service at all (whereas with a disabled service, a user or process can still start it). Use\r\nthe unmask subcommand to reverse the setting:\r\n$ sudo systemctl mask sshd\r\nDisplay all subcommands\r\nBash's built-in tab-completion feature is one of my favorite tricks for systemctl (and other commands). When\r\nworking with commands that support subcommands, this feature saves you a lot of time. Simply type systemctl\r\nand add a space, then tap the Tab key twice. Bash displays all available subcommands.\r\nThe challenge\r\nDo you think you're ready to use systemctl to manage your services? Fire up a lab virtual machine and choose a\r\nservice to work with. Don't do this on a production system! Make sure you can accomplish the following tasks:\r\n1. Check the status of your service. Is it started? Enabled?\r\nhttps://www.redhat.com/en/blog/linux-systemctl-manage-services\r\nPage 2 of 3\n\n2. Stop the service and recheck its status.\r\n3. Disable the service, reboot the system, and confirm the service did not start.\r\n4. Enable the service, reboot the system, and confirm the service did start.\r\n5. Stop the service and use the mask subcommand to prevent it from launching. Use the systemctl start\r\ncommand to attempt to start it. Were you successful?\r\n6. Use Bash's tab-completion feature to display all available subcommands for systemctl .\r\nWrap up\r\nMany management tasks involve the systemctl command, but the ones covered above represent the majority of\r\nthem. Service management is critical, especially when editing configuration files and hardening a system. Plan to\r\nbe confident, competent, and quick at using systemctl and its common subcommands.\r\nSource: https://www.redhat.com/en/blog/linux-systemctl-manage-services\r\nhttps://www.redhat.com/en/blog/linux-systemctl-manage-services\r\nPage 3 of 3",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://www.redhat.com/en/blog/linux-systemctl-manage-services"
	],
	"report_names": [
		"linux-systemctl-manage-services"
	],
	"threat_actors": [
		{
			"id": "67bf0462-41a3-4da5-b876-187e9ef7c375",
			"created_at": "2022-10-25T16:07:23.44832Z",
			"updated_at": "2026-04-10T02:00:04.607111Z",
			"deleted_at": null,
			"main_name": "Careto",
			"aliases": [
				"Careto",
				"The Mask",
				"Ugly Face"
			],
			"source_name": "ETDA:Careto",
			"tools": [
				"Careto"
			],
			"source_id": "ETDA",
			"reports": null
		},
		{
			"id": "f5bf6853-3f6e-452c-a7b7-8f81c9a27476",
			"created_at": "2023-01-06T13:46:38.677391Z",
			"updated_at": "2026-04-10T02:00:03.064818Z",
			"deleted_at": null,
			"main_name": "Careto",
			"aliases": [
				"The Mask",
				"Ugly Face"
			],
			"source_name": "MISPGALAXY:Careto",
			"tools": [],
			"source_id": "MISPGALAXY",
			"reports": null
		}
	],
	"ts_created_at": 1775433969,
	"ts_updated_at": 1775791878,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/243f299c316e1f8ba19d1befdeb914b05d1664b8.pdf",
		"text": "https://archive.orkl.eu/243f299c316e1f8ba19d1befdeb914b05d1664b8.txt",
		"img": "https://archive.orkl.eu/243f299c316e1f8ba19d1befdeb914b05d1664b8.jpg"
	}
}