mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 10:47:42 +00:00
Update cheatsheets
This commit is contained in:
@@ -13,6 +13,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo aa-disable {{path/to/profile1 path/to/profile2 ...}}`
|
||||
|
||||
- Disable profiles (defaults to `/etc/apparmor.d`):
|
||||
- Disable profiles in a directory (defaults to `/etc/apparmor.d`):
|
||||
|
||||
`sudo aa-disable --dir {{path/to/profiles}}`
|
||||
|
||||
@@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enable profile:
|
||||
|
||||
`sudo aa-enforce {{path/to/profile1 path/to/profile2 ...}}`
|
||||
`sudo aa-enforce --dir {{path/to/profile}}`
|
||||
|
||||
- Enable profiles:
|
||||
|
||||
`sudo aa-enforce --dir {{path/to/profile}}`
|
||||
`sudo aa-enforce {{path/to/profile1 path/to/profile2 ...}}`
|
||||
|
||||
@@ -15,24 +15,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a new user with the specified user ID:
|
||||
|
||||
`sudo useradd --uid {{id}} {{username}}`
|
||||
`sudo useradd {{-u|--uid}} {{id}} {{username}}`
|
||||
|
||||
- Create a new user with the specified shell:
|
||||
|
||||
`sudo useradd --shell {{path/to/shell}} {{username}}`
|
||||
`sudo useradd {{-s|--shell}} {{path/to/shell}} {{username}}`
|
||||
|
||||
- Create a new user belonging to additional groups (mind the lack of whitespace):
|
||||
|
||||
`sudo useradd --groups {{group1,group2,...}} {{username}}`
|
||||
`sudo useradd {{-G|--groups}} {{group1,group2,...}} {{username}}`
|
||||
|
||||
- Create a new user with the default home directory:
|
||||
|
||||
`sudo useradd --create-home {{username}}`
|
||||
`sudo useradd {{-m|--create-home}} {{username}}`
|
||||
|
||||
- Create a new user with the home directory filled by template directory files:
|
||||
|
||||
`sudo useradd --skel {{path/to/template_directory}} --create-home {{username}}`
|
||||
`sudo useradd {{-k|--skel}} {{path/to/template_directory}} {{-m|--create-home}} {{username}}`
|
||||
|
||||
- Create a new system user without the home directory:
|
||||
|
||||
`sudo useradd --system {{username}}`
|
||||
`sudo useradd {{-r|--system}} {{username}}`
|
||||
|
||||
@@ -15,8 +15,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Remove a user in other root directory:
|
||||
|
||||
`sudo userdel --root {{path/to/other/root}} {{username}}`
|
||||
`sudo userdel {{-R|--root}} {{path/to/other/root}} {{username}}`
|
||||
|
||||
- Remove a user along with the home directory and mail spool:
|
||||
|
||||
`sudo userdel --remove {{username}}`
|
||||
`sudo userdel {{-r|--remove}} {{username}}`
|
||||
|
||||
@@ -11,20 +11,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change a username:
|
||||
|
||||
`sudo usermod --login {{new_username}} {{username}}`
|
||||
`sudo usermod {{-l|--login}} {{new_username}} {{username}}`
|
||||
|
||||
- Change a user ID:
|
||||
|
||||
`sudo usermod --uid {{id}} {{username}}`
|
||||
`sudo usermod {{-u|--uid}} {{id}} {{username}}`
|
||||
|
||||
- Change a user shell:
|
||||
|
||||
`sudo usermod --shell {{path/to/shell}} {{username}}`
|
||||
`sudo usermod {{-s|--shell}} {{path/to/shell}} {{username}}`
|
||||
|
||||
- Add a user to supplementary groups (mind the lack of whitespace):
|
||||
|
||||
`sudo usermod --append --groups {{group1,group2,...}} {{username}}`
|
||||
`sudo usermod {{-a|--append}} {{-G|--groups}} {{group1,group2,...}} {{username}}`
|
||||
|
||||
- Change a user home directory:
|
||||
|
||||
`sudo usermod --move-home --home {{path/to/new_home}} {{username}}`
|
||||
`sudo usermod {{-m|--move-home}} {{-d|--home}} {{path/to/new_home}} {{username}}`
|
||||
|
||||
Reference in New Issue
Block a user