mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 08:49:13 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/linux/audit2allow
Normal file
26
tldr/linux/audit2allow
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# audit2allow
|
||||
|
||||
> Create an SELinux local policy module to allow rules based on denied operations found in logs.
|
||||
> Note: Use audit2allow with caution—always review the generated policy before applying it, as it may allow excessive access.
|
||||
> More information: <https://manned.org/audit2allow>.
|
||||
|
||||
- Generate a local policy to allow access for all denied services:
|
||||
|
||||
`sudo audit2allow --all -M {{local_policy_name}}`
|
||||
|
||||
- Generate a local policy module to grant access to a specific process/service/command from the audit logs:
|
||||
|
||||
`sudo grep {{apache2}} /var/log/audit/audit.log | sudo audit2allow -M {{local_policy_name}}`
|
||||
|
||||
- Inspect and review the Type Enforcement (.te) file for a local policy:
|
||||
|
||||
`vim {{local_policy_name}}.te`
|
||||
|
||||
- Install a local policy module:
|
||||
|
||||
`sudo semodule -i {{local_policy_name}}.pp`
|
||||
@@ -24,16 +24,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download a macOS recovery image and creates a virtual machine configuration:
|
||||
|
||||
`quickget macos {{high-sierra|mojave|catalina|big-sur|monterey|ventura}}`
|
||||
`quickget macos {{mojave|catalina|big-sur|monterey|ventura|sonoma}}`
|
||||
|
||||
- Show an ISO URL for an operating system (Note: it does not work for Windows):
|
||||
- Show an ISO URL for an operating system:
|
||||
|
||||
`quickget --show-iso-url fedora {{release}} {{edition}}`
|
||||
`quickget --url fedora {{release}} {{edition}}`
|
||||
|
||||
- Test if an ISO file is available for an operating system:
|
||||
|
||||
`quickget --test-iso-url nixos {{edition}} {{plasma5}}`
|
||||
`quickget --check nixos {{release}} {{edition}}`
|
||||
|
||||
- Open an operating system distribution's homepage in a browser (Note: it does not work for Windows):
|
||||
- Download an image without building any VM configuration:
|
||||
|
||||
`quickget --open-distro-homepage {{os}}`
|
||||
`quickget --download {{os}} {{release}} {{edition}}`
|
||||
|
||||
- Create a VM configuration for an OS image:
|
||||
|
||||
`quickget --create-config {{os}} {{path/to/iso}}`
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Manage the trashcan/recycling bin.
|
||||
> More information: <https://github.com/andreafrancia/trash-cli>.
|
||||
|
||||
- Delete a file and send it to the trash:
|
||||
- Send a file to the trash:
|
||||
|
||||
`trash {{path/to/file}}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user