mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
@@ -29,7 +29,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`docker images`
|
||||
|
||||
- Open a shell inside a running container:
|
||||
- Open an [i]nteractive [t]ty with Bourne shell (`sh`) inside a running container:
|
||||
|
||||
`docker exec -it {{container_name}} {{sh}}`
|
||||
|
||||
|
||||
@@ -12,6 +12,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`dotnet add reference {{path/to/reference.csproj}}`
|
||||
|
||||
- Add multiple references to the project in the current directory:
|
||||
|
||||
`dotnet add reference {{path/to/reference1.csproj path/to/reference2.csproj ...}}`
|
||||
|
||||
- Add a reference to the specific project:
|
||||
|
||||
`dotnet add {{path/to/project.csproj}} reference {{path/to/reference.csproj}}`
|
||||
|
||||
- Add multiple references to the specific project:
|
||||
|
||||
`dotnet add {{path/to/project.csproj}} reference {{path/to/reference1.csproj path/to/reference2.csproj ...}}`
|
||||
|
||||
@@ -20,14 +20,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`history -{{d|f|i|E}}`
|
||||
|
||||
- Clear the commands history list (only for current Bash shell):
|
||||
- [c]lear the commands history list (only for current Bash shell):
|
||||
|
||||
`history -c`
|
||||
|
||||
- Overwrite history file with history of current Bash shell (often combined with `history -c` to purge history):
|
||||
- Over[w]rite history file with history of current Bash shell (often combined with `history -c` to purge history):
|
||||
|
||||
`history -w`
|
||||
|
||||
- Delete the history entry at the specified offset:
|
||||
- [d]elete the history entry at the specified offset:
|
||||
|
||||
`history -d {{offset}}`
|
||||
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# chcon
|
||||
|
||||
> Change SELinux security context of a file or files/directories.
|
||||
> See also: `secon`, `restorecon`, `semanage-fcontext`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/chcon>.
|
||||
|
||||
- View security context of a file:
|
||||
|
||||
25
tldr/linux/ctop
Normal file
25
tldr/linux/ctop
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ctop
|
||||
|
||||
> Instantly visualize container performance and health with real-time metrics on CPU, memory, and block IO usage.
|
||||
> More information: <https://github.com/bcicen/ctop>.
|
||||
|
||||
- Show only [a]ctive containers:
|
||||
|
||||
`ctop -a`
|
||||
|
||||
- [r]everse the container sort order:
|
||||
|
||||
`ctop -r`
|
||||
|
||||
- [i]nvert the default colors:
|
||||
|
||||
`ctop -i`
|
||||
|
||||
- Display [h]elp:
|
||||
|
||||
`ctop -h`
|
||||
22
tldr/linux/matchpathcon
Normal file
22
tldr/linux/matchpathcon
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# matchpathcon
|
||||
|
||||
> Lookup the persistent SELinux security context setting of a path.
|
||||
> See also: `semanage-fcontext`, `secon`, `chcon`, `restorecon`.
|
||||
> More information: <https://manned.org/man/matchpathcon.8>.
|
||||
|
||||
- Lookup the persistent security context setting of an absolute path:
|
||||
|
||||
`matchpathcon {{/path/to/file}}`
|
||||
|
||||
- Restrict lookup to settings on a specific file type:
|
||||
|
||||
`matchpathcon -m {{file|dir|pipe|chr_file|blk_file|lnk_file|sock_file}} {{/path/to/file}}`
|
||||
|
||||
- [V]erify that the persistent and current security context of a path agree:
|
||||
|
||||
`matchpathcon -V {{/path/to/file}}`
|
||||
@@ -6,10 +6,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# runcon
|
||||
|
||||
> Run a program in a different SELinux security context.
|
||||
> With neither context nor command, print the current security context.
|
||||
> See also: `secon`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/runcon>.
|
||||
|
||||
- Determine the current domain:
|
||||
- Print the security context of the current execution context:
|
||||
|
||||
`runcon`
|
||||
|
||||
|
||||
30
tldr/linux/secon
Normal file
30
tldr/linux/secon
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# secon
|
||||
|
||||
> Get the SELinux security context of a file, pid, current execution context, or a context specification.
|
||||
> See also: `semanage`, `runcon`, `chcon`.
|
||||
> More information: <https://manned.org/man/secon>.
|
||||
|
||||
- Get the security context of the current execution context:
|
||||
|
||||
`secon`
|
||||
|
||||
- Get the current security context of a process:
|
||||
|
||||
`secon --pid {{1}}`
|
||||
|
||||
- Get the current security context of a file, resolving all intermediate symlinks:
|
||||
|
||||
`secon --file {{path/to/file_or_directory}}`
|
||||
|
||||
- Get the current security context of a symlink itself (i.e. do not resolve):
|
||||
|
||||
`secon --link {{path/to/symlink}}`
|
||||
|
||||
- Parse and explain a context specification:
|
||||
|
||||
`secon {{system_u:system_r:container_t:s0:c899,c900}}`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# semanage fcontext
|
||||
|
||||
> Manage persistent SELinux security context rules on files/directories.
|
||||
> See also: `semanage`, `restorecon`.
|
||||
> See also: `semanage`, `matchpathcon`, `secon`, `chcon`, `restorecon`.
|
||||
> More information: <https://manned.org/semanage-fcontext>.
|
||||
|
||||
- List all file labelling rules:
|
||||
|
||||
14
tldr/linux/togglesebool
Normal file
14
tldr/linux/togglesebool
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# togglesebool
|
||||
|
||||
> Flip the current (non-persistent) values of SELinux booleans.
|
||||
> Note: This tool has been deprecated and often removed in favor of `setsebool`.
|
||||
> More information: <https://manned.org/man/togglesebool>.
|
||||
|
||||
- Flip the current (non-persistent) values of the specified booleans:
|
||||
|
||||
`sudo togglesebool {{virt_use_samba virt_use_usb ...}}`
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# torify
|
||||
|
||||
> Route network traffic through the Tor network.
|
||||
> Note: This command has been deprecated, and is now a backwards-compatible wrapper of `torsocks`.
|
||||
> More information: <https://manned.org/man/torify>.
|
||||
|
||||
- Route traffic via Tor:
|
||||
|
||||
27
tldr/linux/urpmi.addmedia
Normal file
27
tldr/linux/urpmi.addmedia
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# urpmi.addmedia
|
||||
|
||||
> Add media in Mageia.
|
||||
> Note: Mageia documentation uses medium and repository as synonymous.
|
||||
> See also: `urpmi`, `urpmi.update`, `urpme`, `urpmi.removemedia`, `urpmf`, `urpmq`.
|
||||
> More information: <https://wiki.mageia.org/en/URPMI#urpme>.
|
||||
|
||||
- Add a medium:
|
||||
|
||||
`sudo urpmi.addmedia {{medium}} {{ftp://ftp.site.com/path/to/Mageia/RPMS}}`
|
||||
|
||||
- Add a medium from a hard drive (run `genhdlist2` in the directory first):
|
||||
|
||||
`sudo urpmi.addmedia --distrib HD file:/{{/path/to/repo}}`
|
||||
|
||||
- Add important media from a chosen mirror:
|
||||
|
||||
`sudo urpmi.addmedia --distrib ftp://{{mirror_website}/mirror/mageia/distrib/{{version}}/{{arch}}`
|
||||
|
||||
- Automatically select mirrors from a mirror list:
|
||||
|
||||
`sudo urpmi.addmedia --distrib --mirrorlist {{mirrorlist}}`
|
||||
23
tldr/linux/urpmi.removemedia
Normal file
23
tldr/linux/urpmi.removemedia
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# urpmi.removemedia
|
||||
|
||||
> Remove media in Mageia.
|
||||
> Note: Mageia documentation uses medium and repository as synonymous.
|
||||
> See also: `urpmi`, `urpme`, `urpmi.addmedia`, `urpmi.update`, `urpmf`, `urpmq`.
|
||||
> More information: <https://wiki.mageia.org/en/URPMI#urpmi.removemedia>.
|
||||
|
||||
- Remove a medium:
|
||||
|
||||
`sudo urpmi.removemedia {{medium}}`
|
||||
|
||||
- Remove all media:
|
||||
|
||||
`sudo urpmi.removemedia -a`
|
||||
|
||||
- Remove media fuzz[y] matching on media names:
|
||||
|
||||
`sudo urpmi.removemedia -y {{keyword}}`
|
||||
27
tldr/linux/urpmi.update
Normal file
27
tldr/linux/urpmi.update
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# urpmi.update
|
||||
|
||||
> Update the list of packages from a package repository in Mageia.
|
||||
> Note: Mageia documentation uses medium and repository as synonymous.
|
||||
> See also: `urpmi`, `urpme`, `urpmi.addmedia`, `urpmi.removemedia`, `urpmf`, `urpmq`.
|
||||
> More information: <https://wiki.mageia.org/en/URPMI#urpmi.update>.
|
||||
|
||||
- Update all enabled media:
|
||||
|
||||
`urpmi.update -a`
|
||||
|
||||
- Update specific media (including disabled media):
|
||||
|
||||
`urpmi.update {{medium1 medium2 ...}}`
|
||||
|
||||
- Update all media that contain a specific keyword:
|
||||
|
||||
`urpmi.update {{keyword}}`
|
||||
|
||||
- Update all configured media:
|
||||
|
||||
`urpmi.update e`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ollama
|
||||
|
||||
> A large language model runner.
|
||||
> More information: <https://github.com/jmorganca/ollama>.
|
||||
> More information: <https://github.com/ollama/ollama>.
|
||||
|
||||
- Start the daemon required to run other commands:
|
||||
|
||||
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ollama rm {{model}}`
|
||||
|
||||
- Create a model from a `Modelfile`:
|
||||
- Create a model from a `Modelfile` ([f]):
|
||||
|
||||
`ollama create {{new_model_name}} -f {{path/to/Modelfile}}`
|
||||
|
||||
Reference in New Issue
Block a user