• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

loginctl: command not found

by Deepika

loginctl is a command line utility used to manage and control the systemd-logind login manager, which is used to manage user logins and sessions on Linux systems using systemd. It provides a variety of functions, including starting and stopping user sessions, listing active sessions and users, and managing the settings and properties of user sessions.

loginctl is an essential tool for system administrators and developers who need to manage and control the systemd-logind login manager. It provides a flexible and convenient interface for controlling user sessions and managing the settings and properties of the login manager, making it an important part of the systemd system management suite.

If you encounter the below error while running the command loginctl:

loginctl: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install systemd
Ubuntu apt-get install systemd
Arch Linux pacman -S systemd
Kali Linux apt-get install systemd
CentOS yum install systemd
Fedora dnf install systemd
Raspbian apt-get install systemd

loginctl Command Examples

1. Print all current sessions:

# loginctl list-sessions

2. Print all properties of a specific session:

# loginctl show-session session_id --all

3. Print all properties of a specific user:

# loginctl show-user username

4. Print a specific property of a user:

# loginctl show-user username --property=property_name

5. Execute a `loginctl` operation on a remote host:

# loginctl list-users -H hostname

Filed Under: Linux

Some more articles you might also be interested in …

  1. nautilus Command Examples in Linux
  2. How to restore files under user’s home directory to default in Linux
  3. pmap: command not found
  4. CentOS / RHEL 7 : How to specify command-line arguments and options when the dhcpd service is started
  5. expect: command not found
  6. cpulimit: command not found
  7. How To Remove Disk from a LVM Volume Group
  8. wget Command Examples in Linux
  9. How to install and configure sosreport under CentOS / RHEL
  10. Linux “rm” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright