mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 23:44:01 +00:00
Update cheatsheets
This commit is contained in:
@@ -5,13 +5,17 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# adb forward
|
||||
|
||||
> Connect to an Android device wirelessly.
|
||||
> Forward socket connections to a connected Android device or emulator.
|
||||
> More information: <https://developer.android.com/tools/adb>.
|
||||
|
||||
- Forward a TCP port:
|
||||
- Forward a TCP port to the only connected emulator or device:
|
||||
|
||||
`adb forward tcp:{{local_port}} tcp:{{remote_port}}`
|
||||
|
||||
- Forward a TCP port to a specific emulator or device (by device ID / [s]erial number):
|
||||
|
||||
`adb -s {{device_ID}} forward tcp:{{local_port}} tcp:{{remote_port}}`
|
||||
|
||||
- List all forwardings:
|
||||
|
||||
`adb forward --list`
|
||||
|
||||
@@ -12,10 +12,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`adb reverse --list`
|
||||
|
||||
- Reverse a TCP port from an emulator or device to localhost:
|
||||
- Reverse a TCP port from the only connected emulator or device to localhost:
|
||||
|
||||
`adb reverse tcp:{{remote_port}} tcp:{{local_port}}`
|
||||
|
||||
- Reverse a TCP port from a specific emulator or device (by device ID / [s]erial number) to localhost:
|
||||
|
||||
`adb -s {{device_ID}} adb reverse tcp:{{remote_port}} tcp:{{local_port}}`
|
||||
|
||||
- Remove a reverse socket connections from an emulator or device:
|
||||
|
||||
`adb reverse --remove tcp:{{remote_port}}`
|
||||
|
||||
@@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Work with GitHub repositories.
|
||||
> More information: <https://cli.github.com/manual/gh_repo>.
|
||||
|
||||
- Create a new repository (if the repository name is not set, the default name will be the name of the current directory):
|
||||
- Create a new repository interactively:
|
||||
|
||||
`gh repo {{[new|create]}} {{name}}`
|
||||
`gh repo {{[new|create]}}`
|
||||
|
||||
- Clone a repository:
|
||||
|
||||
|
||||
@@ -6,24 +6,25 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# gh repo create
|
||||
|
||||
> Create a new GitHub repository.
|
||||
> Note: `--public`, `--private`, or `--internal` is required when not running interactively.
|
||||
> More information: <https://cli.github.com/manual/gh_repo_create>.
|
||||
|
||||
- Create a new repository interactively:
|
||||
|
||||
`gh repo {{[new|create]}}`
|
||||
|
||||
- Create a new repository with a specified name and description:
|
||||
|
||||
`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}"`
|
||||
|
||||
- Create a private repository from the current directory:
|
||||
|
||||
`gh repo {{[new|create]}} {{[-s|--source]}} . --private`
|
||||
|
||||
- Clone the new repository locally after creation:
|
||||
|
||||
`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}}`
|
||||
|
||||
- Push the current directory to a new GitHub repository:
|
||||
- Create a public repository from the current directory:
|
||||
|
||||
`gh repo {{[new|create]}} {{[-s|--source]}} . --public`
|
||||
|
||||
- Create a public repository with a specified name and description:
|
||||
|
||||
`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}" --public`
|
||||
|
||||
- Clone the new repository locally after creation:
|
||||
|
||||
`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}} {{--public|--private|--internal}}`
|
||||
|
||||
@@ -34,7 +34,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`htop --readonly`
|
||||
|
||||
- See interactive commands while running htop:
|
||||
- See interactive commands while running `htop`:
|
||||
|
||||
`{{<F1>|<?>}}`
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo debootstrap --variant=minbase stable {{path/to/debian-root}}/`
|
||||
|
||||
- Create an Ubuntu 20.04 system inside the `focal-root` directory with a local mirror:
|
||||
- Create a Debian Unstable system inside the `sid-root` directory with a local mirror:
|
||||
|
||||
`sudo debootstrap focal {{path/to/focal-root}}/ {{file:///path/to/mirror/}}`
|
||||
`sudo debootstrap sid {{path/to/sid-root}}/ {{file:///path/to/mirror/}}`
|
||||
|
||||
- Switch to a bootstrapped system:
|
||||
|
||||
|
||||
29
tldr/linux/mhwd-gpu
Normal file
29
tldr/linux/mhwd-gpu
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mhwd-gpu
|
||||
|
||||
> Configure graphics cards in Manjaro.
|
||||
> More information: <https://wiki.manjaro.org/index.php/Configure_NVIDIA_(non-free)_settings_and_load_them_on_Startup/en#Configure_The_Resolution.2FRefresh_Rate>.
|
||||
|
||||
- Show current Xorg configuration path:
|
||||
|
||||
`mhwd-gpu --status`
|
||||
|
||||
- Check if Xorg configuration has a valid symlink:
|
||||
|
||||
`mhwd-gpu --check`
|
||||
|
||||
- Set a custom Xorg configuration for an Nvidia GPU:
|
||||
|
||||
`sudo mhwd-gpu --setmod nvidia --setxorg /{{path/to/nvidia.conf}}`
|
||||
|
||||
- Set a custom Xorg configuration for an AMD GPU:
|
||||
|
||||
`sudo mhwd-gpu --setmod {{catalyst|ati}} --setxorg /{{path/to/amdgpu.conf}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`mhwd-gpu --help`
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Use a specific operating system:
|
||||
|
||||
`tmt try {{fedora-41}}`
|
||||
`tmt try {{rhel-9}}`
|
||||
|
||||
- Select both custom image and provision method:
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a `toolbox` container from a custom Fedora image:
|
||||
|
||||
`toolbox create {{[-i|--image]}} {{registry.fedoraproject.org/fedora-toolbox:39}}`
|
||||
`toolbox create {{[-i|--image]}} {{quay.io/fedora/fedora:tag}}`
|
||||
|
||||
- Create a `toolbox` container using the default image for Fedora 39:
|
||||
- Create a `toolbox` container using the default image for a specific Fedora release:
|
||||
|
||||
`toolbox create {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}}`
|
||||
`toolbox create {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}}`
|
||||
|
||||
@@ -17,6 +17,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`toolbox enter {{[-r|--release]}} {{release}}`
|
||||
|
||||
- Enter a toolbox container using the default image for Fedora 39:
|
||||
- Enter a toolbox container using the default image for a specific Fedora release:
|
||||
|
||||
`toolbox enter {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}}`
|
||||
`toolbox enter {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}}`
|
||||
|
||||
@@ -17,6 +17,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`toolbox run {{[-d|--distro]}} {{distribution}} {{[-r|--release]}} {{release}} {{command}}`
|
||||
|
||||
- Run `emacs` inside a `toolbox` container using the default image for Fedora 39:
|
||||
- Run `emacs` inside a `toolbox` container using the default image for a specific Fedora release:
|
||||
|
||||
`toolbox run {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} {{f39}} {{emacs}}`
|
||||
`toolbox run {{[-d|--distro]}} {{fedora}} {{[-r|--release]}} f{{version}} {{emacs}}`
|
||||
|
||||
30
tldr/mvn-idea
Normal file
30
tldr/mvn-idea
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mvn idea
|
||||
|
||||
> Generate IntelliJ IDEA project files (`.ipr`, `.iml`, and `.iws`) for a Maven project.
|
||||
> Note: This plugin is retired. It is no longer maintained.
|
||||
> More information: <https://maven.apache.org/plugins/maven-idea-plugin/usage.html>.
|
||||
|
||||
- Generate all IntelliJ IDEA project files:
|
||||
|
||||
`mvn idea:idea`
|
||||
|
||||
- Generate only the project (`.ipr`) file:
|
||||
|
||||
`mvn idea:project`
|
||||
|
||||
- Generate only the workspace (`.iws`) file:
|
||||
|
||||
`mvn idea:workspace`
|
||||
|
||||
- Generate only module (`.iml`) files:
|
||||
|
||||
`mvn idea:module`
|
||||
|
||||
- Delete all generated project files:
|
||||
|
||||
`mvn idea:clean`
|
||||
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Specify a user database entry in the `passwd` file format:
|
||||
|
||||
`su -c 'chpass -a {{username:encrypted_password:uid:gid:...}} -s {{path/to/file}}' {{username}}`
|
||||
`su -c 'chpass -a {{username:encrypted_password:uid:gid:...}} -s {{path/to/shell}}' {{username}}`
|
||||
|
||||
- Only update the [l]ocal password file:
|
||||
|
||||
|
||||
33
tldr/npm-repo
Normal file
33
tldr/npm-repo
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm repo
|
||||
|
||||
> Open the repository page of a package in the browser.
|
||||
> More information: <https://docs.npmjs.com/cli/npm-repo>.
|
||||
|
||||
- Open the repository page of the current project (based on `package.json`):
|
||||
|
||||
`npm repo`
|
||||
|
||||
- Open the repository page of a specific package from the registry:
|
||||
|
||||
`npm repo {{package_name}}`
|
||||
|
||||
- Open repository pages for multiple packages:
|
||||
|
||||
`npm repo {{package_name1 package_name2 ...}}`
|
||||
|
||||
- Print the repository URL instead of opening it in the browser:
|
||||
|
||||
`npm repo --browser false`
|
||||
|
||||
- Open the repository page for a package in a specific browser:
|
||||
|
||||
`npm repo --browser {{browser_name}}`
|
||||
|
||||
- Open the repository page of a package in a specific workspace:
|
||||
|
||||
`npm repo --workspace {{workspace_name}}`
|
||||
41
tldr/oauth2c
Normal file
41
tldr/oauth2c
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# oauth2c
|
||||
|
||||
> Interact with OAuth 2.0 authorization servers.
|
||||
> More information: <https://github.com/cloudentity/oauth2c#usage>.
|
||||
|
||||
- Fetch an access token using client credentials:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --client-secret {{client_secret}}`
|
||||
|
||||
- Fetch a token using authorization code flow:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --response-types code`
|
||||
|
||||
- Fetch a token using authorization code with PKCE:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --pkce`
|
||||
|
||||
- Fetch a token using password credentials:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --username {{username}} --password {{password}}`
|
||||
|
||||
- Refresh an existing access token:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --refresh-token {{refresh_token}}`
|
||||
|
||||
- Fetch a token with specific scopes:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --scopes {{scope1,scope2}}`
|
||||
|
||||
- Use device authorization flow:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} --grant-type device_code`
|
||||
|
||||
- Run in silent mode without browser:
|
||||
|
||||
`oauth2c {{issuer_url}} --client-id {{client_id}} {{[-s|--silent]}} --no-browser`
|
||||
29
tldr/poetry-build
Normal file
29
tldr/poetry-build
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# poetry build
|
||||
|
||||
> Build a Poetry package as a tarball and a wheel.
|
||||
> More information: <https://python-poetry.org/docs/cli/#build>.
|
||||
|
||||
- Build a tarball and a wheel for the project:
|
||||
|
||||
`poetry build`
|
||||
|
||||
- Build a wheel package:
|
||||
|
||||
`poetry build {{[-f|--format]}} wheel`
|
||||
|
||||
- Build a source distribution (sdist):
|
||||
|
||||
`poetry build {{[-f|--format]}} sdist`
|
||||
|
||||
- Clean the output directory before building:
|
||||
|
||||
`poetry build --clean`
|
||||
|
||||
- Set the output directory:
|
||||
|
||||
`poetry build {{[-o|--output]}} {{path/to/directory}}`
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Boot a QEMU instance from a live ISO image:
|
||||
|
||||
`qemu-system-i386 -hda {{image_name.img}} -cdrom {{os_image.iso}} -boot d -m {{4096}}`
|
||||
`qemu-system-i386 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d`
|
||||
|
||||
- Boot from a physical device (e.g. from USB to test a bootable medium):
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Boot a QEMU instance from a live ISO image:
|
||||
|
||||
`qemu-system-x86_64 -hda {{image_name.img}} -cdrom {{os_image.iso}} -boot d -m {{4096}}`
|
||||
`qemu-system-x86_64 -hda {{image_name.img}} -m {{4096}} -cdrom {{os_image.iso}} -boot d`
|
||||
|
||||
- Boot from a physical device (e.g. from USB to test a bootable medium):
|
||||
|
||||
|
||||
19
tldr/vagrant-global-status
Normal file
19
tldr/vagrant-global-status
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant global-status
|
||||
|
||||
> Display the state of all Vagrant machines on the system.
|
||||
> The info is based on a cache, which may become stale and require pruning.
|
||||
> See also: `vagrant`, `vagrant status`.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/global-status>.
|
||||
|
||||
- Display the state of all machines:
|
||||
|
||||
`vagrant global-status`
|
||||
|
||||
- Prune any stale entries from the output:
|
||||
|
||||
`vagrant global-status --prune`
|
||||
26
tldr/vagrant-port
Normal file
26
tldr/vagrant-port
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant port
|
||||
|
||||
> List mappings between guest and host ports.
|
||||
> See also: `vagrant`.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/port>.
|
||||
|
||||
- List all port mappings of machine(s) running in the current directory:
|
||||
|
||||
`vagrant port`
|
||||
|
||||
- List mappings for a specific machine (if `Vagrantfile` is multi-machine):
|
||||
|
||||
`vagrant port {{machine_name}}`
|
||||
|
||||
- Display info for a specific guest port:
|
||||
|
||||
`vagrant port --guest {{port_number}}`
|
||||
|
||||
- Display machine-readable output:
|
||||
|
||||
`vagrant port --machine-readable`
|
||||
26
tldr/vagrant-ssh
Normal file
26
tldr/vagrant-ssh
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant ssh
|
||||
|
||||
> SSH into a running Vagrant machine.
|
||||
> See also: `vagrant`.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/ssh>.
|
||||
|
||||
- SSH into the machine running in the current directory:
|
||||
|
||||
`vagrant ssh`
|
||||
|
||||
- Target a running machine by name or ID:
|
||||
|
||||
`vagrant ssh {{name|id}}`
|
||||
|
||||
- Execute an SSH command and exit:
|
||||
|
||||
`vagrant ssh {{[-c|--command]}} {{ssh_command}}`
|
||||
|
||||
- SSH without authentication, leaving authentication up to the user:
|
||||
|
||||
`vagrant ssh {{[-p|--plain]}}`
|
||||
@@ -5,11 +5,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant status
|
||||
|
||||
> Display the state of the machines Vagrant is managing.
|
||||
> See also: `vagrant`.
|
||||
> Display the state of machines in the current Vagrant environment.
|
||||
> See also: `vagrant`, `vagrant global-status`.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/status>.
|
||||
|
||||
- View status of the currently running machine/s:
|
||||
- View status of the machines in the current directory:
|
||||
|
||||
`vagrant status`
|
||||
|
||||
|
||||
25
tldr/vagrant-upload
Normal file
25
tldr/vagrant-upload
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant upload
|
||||
|
||||
> Upload files and directories from the host to the guest machine.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/upload>.
|
||||
|
||||
- Upload file or directory from the host to the guest machine:
|
||||
|
||||
`vagrant upload {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}`
|
||||
|
||||
- Compress the file or directory before uploading to guest machine:
|
||||
|
||||
`vagrant upload --compress {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}`
|
||||
|
||||
- Specify which type of compression to use. Default type is `zip`:
|
||||
|
||||
`vagrant upload --compression-type {{tgz|zip}} {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}`
|
||||
|
||||
- Create a temporary location on the guest machine and upload files to that location:
|
||||
|
||||
`vagrant upload --temporary {{path/to/source_file_or_directory}} {{path/to/destination_file_or_directory}} {{name|id}}`
|
||||
18
tldr/vagrant-version
Normal file
18
tldr/vagrant-version
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant version
|
||||
|
||||
> Display Vagrant version information.
|
||||
> Note: Internet access is required for vagrant version to check the latest available version.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/version>.
|
||||
|
||||
- Display the currently installed version and latest version of Vagrant that is currently available:
|
||||
|
||||
`vagrant version`
|
||||
|
||||
- Display version:
|
||||
|
||||
`vagrant --version`
|
||||
@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open a specific URL or file:
|
||||
|
||||
`chromium {{https://example.com|path/to/file.html}}`
|
||||
`chromium {{https://example.com|path oile.html}}`
|
||||
|
||||
- Open in incognito mode (use `--inprivate` for Microsoft Edge):
|
||||
|
||||
@@ -31,11 +31,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open with a custom profile directory:
|
||||
|
||||
`chromium --user-data-dir {{path/to/directory}}`
|
||||
`chromium --user-data-dir {{path o\directory}}`
|
||||
|
||||
- Open without CORS validation (useful to test an API):
|
||||
|
||||
`chromium --user-data-dir {{path/to/directory}} --disable-web-security`
|
||||
`chromium --user-data-dir {{path o\directory}} --disable-web-security`
|
||||
|
||||
- Open with a DevTools window for each tab opened:
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open a specific URL or file:
|
||||
|
||||
`msedge {{https://example.com|path/to/file.html}}`
|
||||
`msedge {{https://example.com|path oile.html}}`
|
||||
|
||||
- Open in InPrivate mode:
|
||||
|
||||
@@ -32,11 +32,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open with a custom profile directory:
|
||||
|
||||
`msedge --user-data-dir {{path/to/directory}}`
|
||||
`msedge --user-data-dir {{path o\directory}}`
|
||||
|
||||
- Open without CORS validation (useful to test an API):
|
||||
|
||||
`msedge --user-data-dir {{path/to/directory}} --disable-web-security`
|
||||
`msedge --user-data-dir {{path o\directory}} --disable-web-security`
|
||||
|
||||
- Open with a DevTools window for each tab opened:
|
||||
|
||||
|
||||
12
tldr/windows/scb
Normal file
12
tldr/windows/scb
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# scb
|
||||
|
||||
> This command is an alias of `Set-Clipboard`.
|
||||
|
||||
- View documentation:
|
||||
|
||||
`tldr Set-Clipboard`
|
||||
30
tldr/windows/set-clipboard
Normal file
30
tldr/windows/set-clipboard
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Set-Clipboard
|
||||
|
||||
> Powershell command to set content to clipboard.
|
||||
> Note: `scb` can be used as an alias for `Set-Clipboard`.
|
||||
> More information: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-clipboard>.
|
||||
|
||||
- Copy text to the clipboard:
|
||||
|
||||
`Set-Clipboard -Value "{{text}}"`
|
||||
|
||||
- Copy multiple texts to clipboard separated by new line:
|
||||
|
||||
`Set-Clipboard -Value @("{{text 1}}", "{{text 2}}", "{{text 3}}")`
|
||||
|
||||
- Copy files or directories to clipboard:
|
||||
|
||||
`Set-Clipboard -Path "{{path/to/files_or_directories}}"`
|
||||
|
||||
- Copy multiple files:
|
||||
|
||||
`Set-Clipboard -Path "{{path/to/file1}}","{{path/to/file2}}","{{path/to/file3}}"`
|
||||
|
||||
- To clear the clipboard:
|
||||
|
||||
`Set-Clipboard ""`
|
||||
Reference in New Issue
Block a user