mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-20 05:50:31 +00:00
Update cheatsheets
This commit is contained in:
@@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- View security context of a file:
|
||||
|
||||
`ls -lZ {{path/to/file}}`
|
||||
`ls {{[-lZ|-l --context]}} {{path/to/file}}`
|
||||
|
||||
- Change the security context of a target file, using a reference file:
|
||||
|
||||
`chcon --reference={{reference_file}} {{target_file}}`
|
||||
`chcon --reference {{reference_file}} {{target_file}}`
|
||||
|
||||
- Change the full SELinux security context of a file:
|
||||
|
||||
@@ -23,16 +23,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change only the user part of SELinux security context:
|
||||
|
||||
`chcon -u {{user}} {{filename}}`
|
||||
`chcon {{[-u|--user]}} {{user}} {{filename}}`
|
||||
|
||||
- Change only the role part of SELinux security context:
|
||||
|
||||
`chcon -r {{role}} {{filename}}`
|
||||
`chcon {{[-r|--role]}} {{role}} {{filename}}`
|
||||
|
||||
- Change only the type part of SELinux security context:
|
||||
|
||||
`chcon -t {{type}} {{filename}}`
|
||||
`chcon {{[-t|--type]}} {{type}} {{filename}}`
|
||||
|
||||
- Change only the range/level part of SELinux security context:
|
||||
|
||||
`chcon -l {{range/level}} {{filename}}`
|
||||
`chcon {{[-l|--range]}} {{range/level}} {{filename}}`
|
||||
|
||||
Reference in New Issue
Block a user