• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How To Configure and setup Systemd Service on Linux Mint 20.3

  • 00:40 lsb_release -a
  • 00:57 nano linuxhelp.sh
  • 02:15 chmod +x linuxhelp.sh
  • 02:41 cd /etc/systemd/system
  • 02:56 nano linuxhelp.service
  • 04:00 systemctl start linuxhelp
  • 04:11 systemctl status linuxhelp
  • 04:46 tail /var/log/syslog
  • 05:11 journalctl -u linuxhelp -f
  • 05:33 systemctl stop linuxhelp
  • 05:51 nano linuxhelp.service
  • 09:10 systemctl enable linuxhelp
  • 09:30 systemctl daemon-reload
  • 09:45 systemctl restart linuxhelp
  • 10:00 systemctl status linuxhelp
{{postValue.id}}

To Setup and Configure Systemd service On Linux Mint 20.3

Introduction:

Systemd isáthe first daemon to start during booting and the last daemon to terminate during shutdown. The Systemd daemon serves as the root of the user space's process tree; The first process (PID 1) has a special role on Unix systems, As it replaces the parent of a process when the original parent terminates.

Installation Procedure:

Step 1 : Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a

No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20.3
Release:	20.3
Codename:	una

Step 2 : Edit the .sh file in the name of linuxhelp by using the below command

root@linuxhelp:~# nano linuxhelp.sh

Step 3 : Execute Permission given to linuxhelp.sh file by using the below command

root@linuxhelp:~# chmod +x linuxhelp.sh

Step 4 : Enter the system service default path by using the below command

root@linuxhelp:~# cd /etc/systemd/system

Step 5 : Configure the linuxhelp.service file by using the below command

root@linuxhelp:/etc/systemd/system# nano linuxhelp.service

Step 6 : Start the linuxhelp service by using the below command

root@linuxhelp:/etc/systemd/system# systemctl start linuxhelp

Step 7 : Check the status of linuxhelp service by using the below command

root@linuxhelp:/etc/systemd/system# systemctl status linuxhelp

ΓùÅ linuxhelp.service
     Loaded: loaded (/etc/systemd/system/linuxhelp.service; static; vendor preset: enabled)
     Active: active (running) since Wed 2022-04-20 05:15:45 IST; 8s ago
   Main PID: 4857 (linuxhelp.sh)
      Tasks: 2 (limit: 4571)
     
Memory: 1.3M
     CGroup: /system.slice/linuxhelp.service
             Γö£ΓöÇ4857 /bin/bash /root/linuxhelp.sh
             ΓööΓöÇ4895 sleep 1

Apr 20 05:15:45 linuxhelp systemd[1]: Started linuxhelp.service.
Apr 20 05:15:45 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:45 AM IST
Apr 20 05:15:46 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:46 AM IST
Apr 20 05:15:47 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:47 AM IST
Apr 20 05:15:48 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:48 AM IST
Apr 20 05:15:49 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:49 AM IST
Apr 20 05:15:50 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:50 AM IST
Apr 20 05:15:51 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:51 AM IST
Apr 20 05:15:52 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:52 AM IST
Apr 20 05:15:53 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:15:53 AM IST

Step 8 : View the syslog file by using the below command

root@linuxhelp:/etc /systemd/system# tail /var/log/syslog 

Apr 20 05:16:24 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:24 AM IST
Apr 20 05:16:25 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:25 AM IST
Apr 20 05:16:26 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:26 AM IST
Apr 20 05:16:27 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:27 AM IST
Apr 20 05:16:28 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:28 AM IST
Apr 20 05:16:29 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:29 AM IST
Apr 20 05:16:30 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:30 AM IST
Apr 20 05:16:31 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:31 AM IST
Apr 20 05:16:32 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:32 AM IST
Apr 20 05:16:33 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:16:33 AM IST

Step 9 : View the log while it is running every second by using the below command

root@linuxhelp:/etc/systemd/system# journalctl -u linuxhelp -f
-- Logs begin at Sat 2022-04-02 00:59:05 IST. --
Apr 20 05:17:06 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:06 AM IST
Apr 20 05:17:07 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:07 AM IST
Apr 20 05:17:08 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:08 AM IST
Apr 20 05:17:09 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:09 AM IST
Apr 20 05:17:10 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:10 AM IST
Apr 20 05:17:11 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:11 AM IST
Apr 20 05:17:12 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:12 AM IST
Apr 20 05:17:13 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:13 AM IST
Apr 20 05:17:14 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:14 AM IST
Apr 20 05:17:15 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:15 AM IST
Apr 20 05:17:16 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:16 AM IST
Apr 20 05:17:17 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:17 AM IST
Apr 20 05:17:18 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:18 AM IST
Apr 20 05:17:19 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:19 AM IST
Apr 20 05:17:20 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:20 AM IST
Apr 20 05:17:21 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:21 AM IST
Apr 20 05:17:22 linuxhelp linuxhelp.sh[4857]: The current time is Wednesday 20 April 2022 05:17:22 AM IST
^Z
[2]+  Stopped                 journalctl -u linuxhelp –f

Step 10: Stop the service of linuxhelp by using the below command

root@linuxhelp:/etc/systemd/system# systemctl stop linuxhelp

Step 11 : Edit the linuxhelp.service file by using the below command

root@linuxhelp:/etc/systemd/system# nano linuxhelp.service

Step 12 : Enable the service of linuxhelp by using the below command

root@linuxhelp:/etc/systemd/system# systemctl enable linuxhelp
Created symlink /etc/systemd/system/mylti-user.target.wants/linuxhelp.service → /etc/systemd/system/linuxhelp.service.

Step 13 : Reload the daemon service by using the below command

root@linuxhelp:/etc/systemd/system# systemctl daemon-reload
	

Step 14 : Restart the service of linuxhelp by using the below command

root@linuxhelp:/etc/systemd/system# systemctl restart linuxhelp

Step 15 : Check the status of linuxhelp by using the below command

root@linuxhelp:/etc/systemd/system# systemctl status linuxhelp
ΓùÅ linuxhelp.service - My linuxhelp service
     Loaded: loaded (/etc/systemd/system/linuxhelp.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-04-20 05:21:56 IST; 8s ago
   Main PID: 5297 (linuxhelp.sh)
      Tasks: 2 (limit: 4571)
     Memory: 1.1M
     CGroup: /system.slice/linuxhelp.service
             Γö£ΓöÇ5297 /bin/bash /root/linuxhelp.sh
             ΓööΓöÇ5335 sleep 1

Apr 20 05:21:56 linuxhelp systemd[1]: Started My linuxhelp service.
Apr 20 05:21:56 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:21:56 AM IST
Apr 20 05:21:57 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:21:57 AM IST
Apr 20 05:21:58 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:21:58 AM IST
Apr 20 05:21:59 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:21:59 AM IST
Apr 20 05:22:00 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:22:00 AM IST
Apr 20 05:22:01 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:22:01 AM IST
Apr 20 05:22:02 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:22:02 AM IST
Apr 20 05:22:03 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:22:03 AM IST
Apr 20 05:22:04 linuxhelp linuxhelp.sh[5297]: The current time is Wednesday 20 April 2022 05:22:04 AM IST

With this, the process of Configuring Systemd Service On Linux Mint 20.3 has comes to an end

Tags:
ethan
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How do systemd services work?

A

The systemctl command is a utility that is responsible for examining and controlling the systemd system and service manager.

Q

Where do systemd service files go?

A

Unit files are stored in the /usr/lib/systemd directory and its subdirectories,

Q

Why does systemd service fail?

A

A Failed Systemd Service
There might be any number of reasons responsible for a service crash or failure such as misconfigurations, lack of system resources, file/data corruption, etc.

Q

What is systemd and how does it work?

A

systemd is the first daemon to start during booting and the last daemon to terminate during shutdown

Q

How do I view systemd logs?

A

To see the logs that the journald daemon has collected, use the journalctl command.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.