HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

homectl — Create, remove, change, or inspect home directories using the systemd-homed service. More informatio

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createhomecommandremovehomectlclichangeinspect
linux

Problem

How to use the homectl command: Create, remove, change, or inspect home directories using the systemd-homed service. More information: <https://www.freedesktop.org/software/systemd/man/latest/homectl.html>.

Solution

homectl — Create, remove, change, or inspect home directories using the systemd-homed service. More information: <https://www.freedesktop.org/software/systemd/man/latest/homectl.html>.

List user accounts and their associated home directories:
homectl list


Create a user account and their associated home directory:
sudo homectl create {{username}}


Remove a specific user and the associated home directory:
sudo homectl remove {{username}}


Change the password for a specific user:
sudo homectl passwd {{username}}


Run a shell or a command with access to a specific home directory:
sudo homectl with {{username}} -- {{command}} {{command_arguments}}


Lock or unlock a specific home directory:
sudo homectl {{lock|unlock}} {{username}}


Change the disk space assigned to a specific home directory to 100 GiB:
sudo homectl resize {{username}} {{100G}}


Display help:
homectl {{[-h|--help]}}

Code Snippets

List user accounts and their associated home directories

homectl list

Create a user account and their associated home directory

sudo homectl create {{username}}

Remove a specific user and the associated home directory

sudo homectl remove {{username}}

Change the password for a specific user

sudo homectl passwd {{username}}

Run a shell or a command with access to a specific home directory

sudo homectl with {{username}} -- {{command}} {{command_arguments}}

Context

tldr-pages: linux/homectl

Revisions (0)

No revisions yet.