#Linux Series : P1 : Common cmds for all the services

#Linux Series : P1 : Common cmds for all the services


service_name can be any service : httpd,ntpd,sshd....


# systemctl status service_name >> Check service status (Start/stop & enable/disable)

# systemctl |grep service_name >> Check service status (Start/stop & enable/disable)

# systemctl status service_name -l >> Check service status with more details.

# systemctl mask service_name >> To prevent any kind of activation, even manual.

# systemctl unmask service_name >> Unmask the unit files of the service

# systemctl restart service_name >> stop and start the service sequentially .

# systemctl start service_name >> start a specified unit, in other words, launch the concerned process

# systemctl stop service_name >> stop a specified unit, in other words, kill the concerned process

# systemctl reload service_name >> Taking into consideration the new configuration without restarting the service.

# systemctl enable service_name >> To configure a service to start when the system boots.

# systemctl disable service_name >> To prevent the service from starting at boot .

# systemctl is-active service_name >> Check if the service in active state.

# systemctl is-enabled service_name >> Check if the service in enable state.

# systemctl is-failed service_name >> Check if the service in failed state.

# systemctl show service_name >> Show service properties (PID,Start Time.....)

# systemctl list-units --type=service >> List all services no matter what the state is.

# systemctl list-units --type=service --state=active >> List all the ACTIVE services.

# systemctl list-units --type=service|grep active >> List all the ACTIVE services.

# systemctl --full --type service --all >> List all services no matter what the state is.

# systemctl --type=service >> List all services no matter what the state is.

# systemctl --failed --all >> List all the failed services.

# systemctl list-unit-files | grep enabled >> List enabled services.

# systemctl list-unit-files | grep disabled >> List disabled services.



The next chapter will cover :

P2: User and Group Administration

The Main Goal is To Make it easy for Others!

要查看或添加评论,请登录

Mustapha JDAD的更多文章

  • How to Prepare for CKA Exam ?

    How to Prepare for CKA Exam ?

    I successfully accomplished this certification. In this article, I'm going to share my exam experience and preparation…

    9 条评论
  • #Linux Series : P6 : Managing SElinux

    #Linux Series : P6 : Managing SElinux

    What is SELinux? It is a one type of security that enhances the security that allows users and administrators more…

    1 条评论
  • #Linux Series : P5 : Network Configuration and Troubleshooting

    #Linux Series : P5 : Network Configuration and Troubleshooting

    What is Network? Combination of two more computers connected together to share their resources each other by means of…

  • #Linux Series : P4 : Logical Volume Management and RAID Levels

    #Linux Series : P4 : Logical Volume Management and RAID Levels

    What is LVM and why we go for LVM? LVM means Logical Volume Management. The combination of 2 or more physical disk in…

  • How to prepare for CKAD Exam?

    How to prepare for CKAD Exam?

    I successfully accomplished this certification. In this article, I'm going to share my exam experience and preparation…

    2 条评论
  • #Linux Series : P3 : Managing Partitions and File Systems

    #Linux Series : P3 : Managing Partitions and File Systems

    What is partition? A partition is a contiguous set of blocks on a drive that are treated as independent disk. What is…

  • Négociation Salaire ! La démarche !

    Négociation Salaire ! La démarche !

    De nombreux candidats sont mal à l'aise à l'idée d'aborder la question de salaire. Le salaire reste un sujet délicat…

  • Simple Tips : Ansible Series : P3

    Simple Tips : Ansible Series : P3

    P3 : How to setup an environment? Linux & Windows ? On linux : 2 ways to install it : YUM or PIP Using YUM: Install…

  • Simple Tips : Ansible Series : P2

    Simple Tips : Ansible Series : P2

    P2 : How does Ansible works ? Ansible works in "Desired State"..

社区洞察

其他会员也浏览了