← 返回命令列表

Linux command

homectl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

homectl list

Create

sudo homectl create [username]

Remove

sudo homectl remove [username]

Example

sudo homectl passwd [username]

Example

sudo homectl with [username] -- [command]

Lock or unlock

sudo homectl lock [username]

Example

sudo homectl resize [username] 100G

Example

homectl -h

说明

homectl manages user accounts and home directories via systemd-homed, a systemd service that provides portable, encrypted home directories. systemd-homed stores user accounts as self-contained records with their home directories. Home directories can be encrypted (LUKS), enabling security features like automatic locking on suspend and portable home directories that can be moved between machines. Features include: - Encrypted home directories - Automatic locking on suspend/idle - Disk quota management - Portable home directories

参数

list
List managed home directories
create _USER_
Create new user with home directory
remove _USER_
Remove user and home directory
passwd _USER_
Change user password
with _USER_ -- _CMD_
Run command with access to user's home
lock _USER_
Lock home directory (deactivate)
unlock _USER_
Unlock home directory (activate)
resize _USER_ _SIZE_
Change home directory size
inspect _USER_
Show user record details
update _USER_
Update user properties
--storage=_TYPE_
Storage type: luks, directory, subvolume, fscrypt, cifs

FAQ

What is the homectl command used for?

homectl manages user accounts and home directories via systemd-homed, a systemd service that provides portable, encrypted home directories. systemd-homed stores user accounts as self-contained records with their home directories. Home directories can be encrypted (LUKS), enabling security features like automatic locking on suspend and portable home directories that can be moved between machines. Features include: - Encrypted home directories - Automatic locking on suspend/idle - Disk quota management - Portable home directories

How do I run a basic homectl example?

Run `homectl list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list do in homectl?

List managed home directories