system
stringclasses 1
value | command
stringlengths 1
20
| response
stringlengths 101
1.77k
|
---|---|---|
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | rename | # rename
> Rename a file or group of files with a regular expression. More information:
> https://www.manpagez.com/man/2/rename/.
* Replace `from` with `to` in the filenames of the specified files:
`rename 's/{{from}}/{{to}}/' {{*.txt}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | oomctl | # oomctl
> Analyze the state stored in `systemd-oomd`. More information:
> https://www.freedesktop.org/software/systemd/man/oomctl.html.
* Show the current state of the cgroups and system contexts stored by `systemd-oomd`:
`oomctl dump` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | newgrp | # newgrp
> Switch primary group membership. More information:
> https://manned.org/newgrp.
* Change user's primary group membership:
`newgrp {{group_name}}`
* Reset primary group membership to user's default group in `/etc/passwd`:
`newgrp` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | strace | # strace
> Troubleshooting tool for tracing system calls. More information:
> https://manned.org/strace.
* Start tracing a specific process by its PID:
`strace -p {{pid}}`
* Trace a process and filter output by system call:
`strace -p {{pid}} -e {{system_call_name}}`
* Count time, calls, and errors for each system call and report a summary on program exit:
`strace -p {{pid}} -c`
* Show the time spent in every system call:
`strace -p {{pid}} -T`
* Start tracing a program by executing it:
`strace {{program}}`
* Start tracing file operations of a program:
`strace -e trace=file {{program}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | locate | # locate
> Find filenames quickly. More information: https://manned.org/locate.
* Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily):
`locate "{{pattern}}"`
* Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`):
`locate */{{filename}}`
* Recompute the database. You need to do it if you want to find recently added files:
`sudo /usr/libexec/locate.updatedb` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ssh-add | # ssh-add
> Manage loaded ssh keys in the ssh-agent. Ensure that ssh-agent is up and
> running for the keys to be loaded in it. More information:
> https://man.openbsd.org/ssh-add.
* Add the default ssh keys in `~/.ssh` to the ssh-agent:
`ssh-add`
* Add a specific key to the ssh-agent:
`ssh-add {{path/to/private_key}}`
* List fingerprints of currently loaded keys:
`ssh-add -l`
* Delete a key from the ssh-agent:
`ssh-add -d {{path/to/private_key}}`
* Delete all currently loaded keys from the ssh-agent:
`ssh-add -D`
* Add a key to the ssh-agent and the keychain:
`ssh-add -K {{path/to/private_key}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pidstat | # pidstat
> Show system resource usage, including CPU, memory, IO etc. More information:
> https://manned.org/pidstat.
* Show CPU statistics at a 2 second interval for 10 times:
`pidstat {{2}} {{10}}`
* Show page faults and memory utilization:
`pidstat -r`
* Show input/output usage per process id:
`pidstat -d`
* Show information on a specific PID:
`pidstat -p {{PID}}`
* Show memory statistics for all processes whose command name include "fox" or "bird":
`pidstat -C "{{fox|bird}}" -r -p ALL` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | taskset | # taskset
> Get or set a process' CPU affinity or start a new process with a defined CPU
> affinity. More information: https://manned.org/taskset.
* Get a running process' CPU affinity by PID:
`taskset --pid --cpu-list {{pid}}`
* Set a running process' CPU affinity by PID:
`taskset --pid --cpu-list {{cpu_id}} {{pid}}`
* Start a new process with affinity for a single CPU:
`taskset --cpu-list {{cpu_id}} {{command}}`
* Start a new process with affinity for multiple non-sequential CPUs:
`taskset --cpu-list {{cpu_id_1}},{{cpu_id_2}},{{cpu_id_3}}`
* Start a new process with affinity for CPUs 1 through 4:
`taskset --cpu-list {{cpu_id_1}}-{{cpu_id_4}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | manpath | # manpath
> Determine the search path for manual pages. More information:
> https://manned.org/manpath.
* Display the search path used to find man pages:
`manpath`
* Show the entire global manpath:
`manpath --global` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | killall | # killall
> Send kill signal to all instances of a process by name (must be exact name).
> All signals except SIGKILL and SIGSTOP can be intercepted by the process,
> allowing a clean exit. More information: https://manned.org/killall.
* Terminate a process using the default SIGTERM (terminate) signal:
`killall {{process_name}}`
* [l]ist available signal names (to be used without the 'SIG' prefix):
`killall -l`
* Interactively ask for confirmation before termination:
`killall -i {{process_name}}`
* Terminate a process using the SIGINT (interrupt) signal, which is the same signal sent by pressing `Ctrl + C`:
`killall -INT {{process_name}}`
* Force kill a process:
`killall -KILL {{process_name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-svn | # git svn
> Bidirectional operation between a Subversion repository and Git. More
> information: https://git-scm.com/docs/git-svn.
* Clone an SVN repository:
`git svn clone {{https://example.com/subversion_repo}} {{local_dir}}`
* Clone an SVN repository starting at a given revision number:
`git svn clone -r{{1234}}:HEAD {{https://svn.example.net/subversion/repo}}
{{local_dir}}`
* Update local clone from the remote SVN repository:
`git svn rebase`
* Fetch updates from the remote SVN repository without changing the Git HEAD:
`git svn fetch`
* Commit back to the SVN repository:
`git svn dcommit` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | runuser | # runuser
> Run commands as a specific user and group without asking for password (needs
> root privileges). More information: https://manned.org/runuser.
* Run command as a different user:
`runuser {{user}} -c '{{command}}'`
* Run command as a different user and group:
`runuser {{user}} -g {{group}} -c '{{command}}'`
* Start a login shell as a specific user:
`runuser {{user}} -l`
* Specify a shell for running instead of the default shell (also works for login):
`runuser {{user}} -s {{/bin/sh}}`
* Preserve the entire environment of root (only if `--login` is not specified):
`runuser {{user}} --preserve-environment -c '{{command}}'` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dirname | # dirname
> Calculates the parent directory of a given file or directory path. More
> information: https://www.gnu.org/software/coreutils/dirname.
* Calculate the parent directory of a given path:
`dirname {{path/to/file_or_directory}}`
* Calculate the parent directory of multiple paths:
`dirname {{path/to/file_a}} {{path/to/directory_b}}`
* Delimit output with a NUL character instead of a newline (useful when combining with `xargs`):
`dirname --zero {{path/to/directory_a}} {{path/to/file_b}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | readelf | # readelf
> Displays information about ELF files. More information:
> http://man7.org/linux/man-pages/man1/readelf.1.html.
* Display all information about the ELF file:
`readelf -all {{path/to/binary}}`
* Display all the headers present in the ELF file:
`readelf --headers {{path/to/binary}}`
* Display the entries in symbol table section of the ELF file, if it has one:
`readelf --symbols {{path/to/binary}}`
* Display the information contained in the ELF header at the start of the file:
`readelf --file-header {{path/to/binary}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | install | # install
> Copy files and set attributes. Copy files (often executable) to a system
> location like `/usr/local/bin`, give them the appropriate
> permissions/ownership. More information:
> https://www.gnu.org/software/coreutils/install.
* Copy files to the destination:
`install {{path/to/source_file1 path/to/source_file2 ...}}
{{path/to/destination}}`
* Copy files to the destination, setting their ownership:
`install --owner {{user}} {{path/to/source_file1 path/to/source_file2 ...}}
{{path/to/destination}}`
* Copy files to the destination, setting their group ownership:
`install --group {{user}} {{path/to/source_file1 path/to/source_file2 ...}}
{{path/to/destination}}`
* Copy files to the destination, setting their `mode`:
`install --mode {{+x}} {{path/to/source_file1 path/to/source_file2 ...}}
{{path/to/destination}}`
* Copy files and apply access/modification times of source to the destination:
`install --preserve-timestamps {{path/to/source_file1 path/to/source_file2
...}} {{path/to/destination}}`
* Copy files and create the directories at the destination if they don't exist:
`install -D {{path/to/source_file1 path/to/source_file2 ...}}
{{path/to/destination}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | crontab | # crontab
> Schedule cron jobs to run on a time interval for the current user. More
> information: https://crontab.guru/.
* Edit the crontab file for the current user:
`crontab -e`
* Edit the crontab file for a specific user:
`sudo crontab -e -u {{user}}`
* Replace the current crontab with the contents of the given file:
`crontab {{path/to/file}}`
* View a list of existing cron jobs for current user:
`crontab -l`
* Remove all cron jobs for the current user:
`crontab -r`
* Sample job which runs at 10:00 every day (* means any value):
`0 10 * * * {{command_to_execute}}`
* Sample crontab entry, which runs a command every 10 minutes:
`*/10 * * * * {{command_to_execute}}`
* Sample crontab entry, which runs a certain script at 02:30 every Friday:
`30 2 * * Fri {{/absolute/path/to/script.sh}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | gpasswd | # gpasswd
> Administer `/etc/group` and `/etc/gshadow`. More information:
> https://manned.org/gpasswd.
* Define group administrators:
`sudo gpasswd -A {{user1,user2}} {{group}}`
* Set the list of group members:
`sudo gpasswd -M {{user1,user2}} {{group}}`
* Create a password for the named group:
`gpasswd {{group}}`
* Add a user to the named group:
`gpasswd -a {{user}} {{group}}`
* Remove a user from the named group:
`gpasswd -d {{user}} {{group}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | getfacl | # getfacl
> Get file access control lists. More information: https://manned.org/getfacl.
* Display the file access control list:
`getfacl {{path/to/file_or_directory}}`
* Display the file access control list with numeric user and group IDs:
`getfacl -n {{path/to/file_or_directory}}`
* Display the file access control list with tabular output format:
`getfacl -t {{path/to/file_or_directory}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tcpdump | # tcpdump
> Dump traffic on a network. More information: https://www.tcpdump.org.
* List available network interfaces:
`tcpdump -D`
* Capture the traffic of a specific interface:
`tcpdump -i {{eth0}}`
* Capture all TCP traffic showing contents (ASCII) in console:
`tcpdump -A tcp`
* Capture the traffic from or to a host:
`tcpdump host {{www.example.com}}`
* Capture the traffic from a specific interface, source, destination and destination port:
`tcpdump -i {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port
{{80}}`
* Capture the traffic of a network:
`tcpdump net {{192.168.1.0/24}}`
* Capture all traffic except traffic over port 22 and save to a dump file:
`tcpdump -w {{dumpfile.pcap}} port not {{22}}`
* Read from a given dump file:
`tcpdump -r {{dumpfile.pcap}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-var | # git var
> Prints a Git logical variable's value. See `git config`, which is preferred
> over `git var`. More information: https://git-scm.com/docs/git-var.
* Print the value of a Git logical variable:
`git var {{GIT_AUTHOR_IDENT|GIT_COMMITTER_IDENT|GIT_EDITOR|GIT_PAGER}}`
* [l]ist all Git logical variables:
`git var -l` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-add | # git add
> Adds changed files to the index. More information: https://git-
> scm.com/docs/git-add.
* Add a file to the index:
`git add {{path/to/file}}`
* Add all files (tracked and untracked):
`git add -A`
* Only add already tracked files:
`git add -u`
* Also add ignored files:
`git add -f`
* Interactively stage parts of files:
`git add -p`
* Interactively stage parts of a given file:
`git add -p {{path/to/file}}`
* Interactively stage a file:
`git add -i` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | command | # command
> Command forces the shell to execute the program and ignore any functions,
> builtins and aliases with the same name. More information:
> https://manned.org/command.
* Execute the `ls` program literally, even if an `ls` alias exists:
`command {{ls}}`
* Display the path to the executable or the alias definition of a specific command:
`command -v {{command_name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-log | # git log
> Show a history of commits. More information: https://git-scm.com/docs/git-
> log.
* Show the sequence of commits starting from the current one, in reverse chronological order of the Git repository in the current working directory:
`git log`
* Show the history of a particular file or directory, including differences:
`git log -p {{path/to/file_or_directory}}`
* Show an overview of which file(s) changed in each commit:
`git log --stat`
* Show a graph of commits in the current branch using only the first line of each commit message:
`git log --oneline --graph`
* Show a graph of all commits, tags and branches in the entire repo:
`git log --oneline --decorate --all --graph`
* Show only commits whose messages include a given string (case-insensitively):
`git log -i --grep {{search_string}}`
* Show the last N commits from a certain author:
`git log -n {{number}} --author={{author}}`
* Show commits between two dates (yyyy-mm-dd):
`git log --before="{{2017-01-29}}" --after="{{2017-01-17}}"` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | nsenter | # nsenter
> Run a new command in a running process' namespace. Particularly useful for
> docker images or chroot jails. More information: https://manned.org/nsenter.
* Run a specific command using the same namespaces as an existing process:
`nsenter --target {{pid}} --all {{command}} {{command_arguments}}`
* Run a specific command in an existing process's network namespace:
`nsenter --target {{pid}} --net {{command}} {{command_arguments}}`
* Run a specific command in an existing process's PID namespace:
`nsenter --target {{pid}} --pid {{command}} {{command_arguments}}`
* Run a specific command in an existing process's IPC namespace:
`nsenter --target {{pid}} --ipc {{command}} {{command_arguments}}`
* Run a specific command in an existing process's UTS, time, and IPC namespaces:
`nsenter --target {{pid}} --uts --time --ipc -- {{command}}
{{command_arguments}}`
* Run a specific command in an existing process's namespace by referencing procfs:
`nsenter --pid=/proc/{{pid}}/pid/net -- {{command}} {{command_arguments}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | setfacl | # setfacl
> Set file access control lists (ACL). More information:
> https://manned.org/setfacl.
* Modify ACL of a file for user with read and write access:
`setfacl -m u:{{username}}:rw {{file}}`
* Modify default ACL of a file for all users:
`setfacl -d -m u::rw {{file}}`
* Remove ACL of a file for a user:
`setfacl -x u:{{username}} {{file}}`
* Remove all ACL entries of a file:
`setfacl -b {{file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | hexdump | # hexdump
> An ASCII, decimal, hexadecimal, octal dump. More information:
> https://manned.org/hexdump.
* Print the hexadecimal representation of a file, replacing duplicate lines by '*':
`hexdump {{path/to/file}}`
* Display the input offset in hexadecimal and its ASCII representation in two columns:
`hexdump -C {{path/to/file}}`
* Display the hexadecimal representation of a file, but interpret only n bytes of the input:
`hexdump -C -n{{number_of_bytes}} {{path/to/file}}`
* Don't replace duplicate lines with '*':
`hexdump --no-squeezing {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | strings | # strings
> Find printable strings in an object file or binary. More information:
> https://manned.org/strings.
* Print all strings in a binary:
`strings {{path/to/file}}`
* Limit results to strings at least length characters long:
`strings -n {{length}} {{path/to/file}}`
* Prefix each result with its offset within the file:
`strings -t d {{path/to/file}}`
* Prefix each result with its offset within the file in hexadecimal:
`strings -t x {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | logname | # logname
> Shows the user's login name. More information:
> https://www.gnu.org/software/coreutils/logname.
* Display the currently logged in user's name:
`logname` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | whereis | # whereis
> Locate the binary, source, and manual page files for a command. More
> information: https://manned.org/whereis.
* Locate binary, source and man pages for ssh:
`whereis {{ssh}}`
* Locate binary and man pages for ls:
`whereis -bm {{ls}}`
* Locate source of gcc and man pages for Git:
`whereis -s {{gcc}} -m {{git}}`
* Locate binaries for gcc in `/usr/bin/` only:
`whereis -b -B {{/usr/bin/}} -f {{gcc}}`
* Locate unusual binaries (those that have more or less than one binary on the system):
`whereis -u *`
* Locate binaries that have unusual manual entries (binaries that have more or less than one manual installed):
`whereis -u -m *` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-tag | # git tag
> Create, list, delete or verify tags. A tag is a static reference to a
> specific commit. More information: https://git-scm.com/docs/git-tag.
* List all tags:
`git tag`
* Create a tag with the given name pointing to the current commit:
`git tag {{tag_name}}`
* Create a tag with the given name pointing to a given commit:
`git tag {{tag_name}} {{commit}}`
* Create an annotated tag with the given message:
`git tag {{tag_name}} -m {{tag_message}}`
* Delete the tag with the given name:
`git tag -d {{tag_name}}`
* Get updated tags from upstream:
`git fetch --tags`
* List all tags whose ancestors include a given commit:
`git tag --contains {{commit}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | flatpak | # flatpak
> Build, install and run flatpak applications and runtimes. More information:
> https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak.
* Run an installed application:
`flatpak run {{name}}`
* Install an application from a remote source:
`flatpak install {{remote}} {{name}}`
* List all installed applications and runtimes:
`flatpak list`
* Update all installed applications and runtimes:
`flatpak update`
* Add a remote source:
`flatpak remote-add --if-not-exists {{remote_name}} {{remote_url}}`
* Remove an installed application:
`flatpak remove {{name}}`
* Remove all unused applications:
`flatpak remove --unused`
* Show information about an installed application:
`flatpak info {{name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | timeout | # timeout
> Run a command with a time limit. More information:
> https://www.gnu.org/software/coreutils/timeout.
* Run `sleep 10` and terminate it, if it runs for more than 3 seconds:
`timeout {{3s}} {{sleep 10}}`
* Specify the signal to be sent to the command after the time limit expires. (By default, TERM is sent):
`timeout --signal {{INT}} {{5s}} {{sleep 10}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | mcookie | # mcookie
> Generates random 128-bit hexadecimal numbers. More information:
> https://manned.org/mcookie.
* Generate a random number:
`mcookie`
* Generate a random number, using the contents of a file as a seed for the randomness:
`mcookie --file {{path/to/file}}`
* Generate a random number, using a specific number of bytes from a file as a seed for the randomness:
`mcookie --file {{path/to/file}} --max-size {{number_of_bytes}}`
* Print the details of the randomness used, such as the origin and seed for each source:
`mcookie --verbose` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | strings | # strings
> Find printable strings in an object file or binary. More information:
> https://manned.org/strings.
* Print all strings in a binary:
`strings {{path/to/file}}`
* Limit results to strings at least length characters long:
`strings -n {{length}} {{path/to/file}}`
* Prefix each result with its offset within the file:
`strings -t d {{path/to/file}}`
* Prefix each result with its offset within the file in hexadecimal:
`strings -t x {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | logname | # logname
> Shows the user's login name. More information:
> https://www.gnu.org/software/coreutils/logname.
* Display the currently logged in user's name:
`logname` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pathchk | # pathchk
> Check the validity and portability of one or more pathnames. More
> information: https://www.gnu.org/software/coreutils/pathchk.
* Check pathnames for validity in the current system:
`pathchk {{path1 path2 …}}`
* Check pathnames for validity on a wider range of POSIX compliant systems:
`pathchk -p {{path1 path2 …}}`
* Check pathnames for validity on all POSIX compliant systems:
`pathchk --portability {{path1 path2 …}}`
* Only check for empty pathnames or leading dashes (-):
`pathchk -P {{path1 path2 …}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sha1sum | # sha1sum
> Calculate SHA1 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/sha1sum.
* Calculate the SHA1 checksum for one or more files:
`sha1sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA1 checksums to a file:
`sha1sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha1}}`
* Calculate a SHA1 checksum from `stdin`:
`{{command}} | sha1sum`
* Read a file of SHA1 sums and filenames and verify all files have matching checksums:
`sha1sum --check {{path/to/file.sha1}}`
* Only show a message for missing files or when verification fails:
`sha1sum --check --quiet {{path/to/file.sha1}}`
* Only show a message when verification fails, ignoring missing files:
`sha1sum --ignore-missing --check --quiet {{path/to/file.sha1}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | unshare | # unshare
> Execute a command in new user-defined namespaces. More information:
> https://www.kernel.org/doc/html/latest/userspace-api/unshare.html.
* Execute a command without sharing access to connected networks:
`unshare --net {{command}} {{command_arguments}}`
* Execute a command as a child process without sharing mounts, processes, or networks:
`unshare --mount --pid --net --fork {{command}} {{command_arguments}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | objdump | # objdump
> View information about object files. More information:
> https://manned.org/objdump.
* Display the file header information:
`objdump -f {{binary}}`
* Display the disassembled output of executable sections:
`objdump -d {{binary}}`
* Display the disassembled executable sections in intel syntax:
`objdump -M intel -d {{binary}}`
* Display a complete binary hex dump of all sections:
`objdump -s {{binary}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | uuidgen | # uuidgen
> Generate new UUID (Universally Unique IDentifier) strings. More information:
> https://www.ss64.com/osx/uuidgen.html.
* Generate a UUID string:
`uuidgen` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | apropos | # apropos
> Search the manual pages for names and descriptions. More information:
> https://manned.org/apropos.
* Search for a keyword using a regular expression:
`apropos {{regular_expression}}`
* Search without restricting the output to the terminal width:
`apropos -l {{regular_expression}}`
* Search for pages that contain all the expressions given:
`apropos {{regular_expression_1}} -a {{regular_expression_2}} -a
{{regular_expression_3}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pathchk | # pathchk
> Check the validity and portability of one or more pathnames. More
> information: https://www.gnu.org/software/coreutils/pathchk.
* Check pathnames for validity in the current system:
`pathchk {{path1 path2 …}}`
* Check pathnames for validity on a wider range of POSIX compliant systems:
`pathchk -p {{path1 path2 …}}`
* Check pathnames for validity on all POSIX compliant systems:
`pathchk --portability {{path1 path2 …}}`
* Only check for empty pathnames or leading dashes (-):
`pathchk -P {{path1 path2 …}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | prlimit | # prlimit
> Get or set process resource soft and hard limits. Given a process ID and one
> or more resources, prlimit tries to retrieve and/or modify the limits. More
> information: https://manned.org/prlimit.
* Display limit values for all current resources for the running parent process:
`prlimit`
* Display limit values for all current resources of a specified process:
`prlimit --pid {{pid number}}`
* Run a command with a custom number of open files limit:
`prlimit --nofile={{10}} {{command}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | getconf | # getconf
> Get configuration values from your Linux system. More information:
> https://manned.org/getconf.1.
* List [a]ll configuration values available:
`getconf -a`
* List the configuration values for a specific directory:
`getconf -a {{path/to/directory}}`
* Check if your linux system is a 32-bit or 64-bit:
`getconf LONG_BIT`
* Check how many processes the current user can run at once:
`getconf CHILD_MAX`
* List every configuration value and then find patterns with the grep command (i.e every value with MAX in it):
`getconf -a | grep MAX` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | envsubst | # envsubst
> Substitutes environment variables with their value in shell format strings.
> Variables to be replaced should be in either `${var}` or `$var` format. More
> information: https://www.gnu.org/software/gettext/manual/html_node/envsubst-
> Invocation.html.
* Replace environment variables in `stdin` and output to `stdout`:
`echo '{{$HOME}}' | envsubst`
* Replace environment variables in an input file and output to `stdout`:
`envsubst < {{path/to/input_file}}`
* Replace environment variables in an input file and output to a file:
`envsubst < {{path/to/input_file}} > {{path/to/output_file}}`
* Replace environment variables in an input file from a space-separated list:
`envsubst '{{$USER $SHELL $HOME}}' < {{path/to/input_file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-fsck | # git fsck
> Verify the validity and connectivity of nodes in a Git repository index.
> Does not make any modifications. See `git gc` for cleaning up dangling
> blobs. More information: https://git-scm.com/docs/git-fsck.
* Check the current repository:
`git fsck`
* List all tags found:
`git fsck --tags`
* List all root nodes found:
`git fsck --root` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | truncate | # truncate
> Shrink or extend the size of a file to the specified size. More information:
> https://www.gnu.org/software/coreutils/truncate.
* Set a size of 10 GB to an existing file, or create a new file with the specified size:
`truncate --size {{10G}} {{filename}}`
* Extend the file size by 50 MiB, fill with holes (which reads as zero bytes):
`truncate --size +{{50M}} {{filename}}`
* Shrink the file by 2 GiB, by removing data from the end of file:
`truncate --size -{{2G}} {{filename}}`
* Empty the file's content:
`truncate --size 0 {{filename}}`
* Empty the file's content, but do not create the file if it does not exist:
`truncate --no-create --size 0 {{filename}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | readlink | # readlink
> Follow symlinks and get symlink information. More information:
> https://www.gnu.org/software/coreutils/readlink.
* Print the absolute path which the symlink points to:
`readlink {{path/to/symlink_file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-pull | # git pull
> Fetch branch from a remote repository and merge it to local repository. More
> information: https://git-scm.com/docs/git-pull.
* Download changes from default remote repository and merge it:
`git pull`
* Download changes from default remote repository and use fast-forward:
`git pull --rebase`
* Download changes from given remote repository and branch, then merge them into HEAD:
`git pull {{remote_name}} {{branch}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-grep | # git-grep
> Find strings inside files anywhere in a repository's history. Accepts a lot
> of the same flags as regular `grep`. More information: https://git-
> scm.com/docs/git-grep.
* Search for a string in tracked files:
`git grep {{search_string}}`
* Search for a string in files matching a pattern in tracked files:
`git grep {{search_string}} -- {{file_glob_pattern}}`
* Search for a string in tracked files, including submodules:
`git grep --recurse-submodules {{search_string}}`
* Search for a string at a specific point in history:
`git grep {{search_string}} {{HEAD~2}}`
* Search for a string across all branches:
`git grep {{search_string}} $(git rev-list --all)` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | unexpand | # unexpand
> Convert spaces to tabs. More information:
> https://www.gnu.org/software/coreutils/unexpand.
* Convert blanks in each file to tabs, writing to `stdout`:
`unexpand {{path/to/file}}`
* Convert blanks to tabs, reading from `stdout`:
`unexpand`
* Convert all blanks, instead of just initial blanks:
`unexpand -a {{path/to/file}}`
* Convert only leading sequences of blanks (overrides -a):
`unexpand --first-only {{path/to/file}}`
* Have tabs a certain number of characters apart, not 8 (enables -a):
`unexpand -t {{number}} {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | hostname | # hostname
> Show or set the system's host name. More information:
> https://manned.org/hostname.
* Show current host name:
`hostname`
* Show the network address of the host name:
`hostname -i`
* Show all network addresses of the host:
`hostname -I`
* Show the FQDN (Fully Qualified Domain Name):
`hostname --fqdn`
* Set current host name:
`hostname {{new_hostname}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-push | # git push
> Push commits to a remote repository. More information: https://git-
> scm.com/docs/git-push.
* Send local changes in the current branch to its default remote counterpart:
`git push`
* Send changes from a specific local branch to its remote counterpart:
`git push {{remote_name}} {{local_branch}}`
* Send changes from a specific local branch to its remote counterpart, and set the remote one as the default push/pull target of the local one:
`git push -u {{remote_name}} {{local_branch}}`
* Send changes from a specific local branch to a specific remote branch:
`git push {{remote_name}} {{local_branch}}:{{remote_branch}}`
* Send changes on all local branches to their counterparts in a given remote repository:
`git push --all {{remote_name}}`
* Delete a branch in a remote repository:
`git push {{remote_name}} --delete {{remote_branch}}`
* Remove remote branches that don't have a local counterpart:
`git push --prune {{remote_name}}`
* Publish tags that aren't yet in the remote repository:
`git push --tags` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | realpath | # realpath
> Display the resolved absolute path for a file or directory. More
> information: https://www.gnu.org/software/coreutils/realpath.
* Display the absolute path for a file or directory:
`realpath {{path/to/file_or_directory}}`
* Require all path components to exist:
`realpath --canonicalize-existing {{path/to/file_or_directory}}`
* Resolve ".." components before symlinks:
`realpath --logical {{path/to/file_or_directory}}`
* Disable symlink expansion:
`realpath --no-symlinks {{path/to/file_or_directory}}`
* Suppress error messages:
`realpath --quiet {{path/to/file_or_directory}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dpkg-deb | # dpkg-deb
> Pack, unpack and provide information about Debian archives. More
> information: https://manpages.debian.org/latest/dpkg/dpkg-deb.html.
* Display information about a package:
`dpkg-deb --info {{path/to/file.deb}}`
* Display the package's name and version on one line:
`dpkg-deb --show {{path/to/file.deb}}`
* List the package's contents:
`dpkg-deb --contents {{path/to/file.deb}}`
* Extract package's contents into a directory:
`dpkg-deb --extract {{path/to/file.deb}} {{path/to/directory}}`
* Create a package from a specified directory:
`dpkg-deb --build {{path/to/directory}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | utmpdump | # utmpdump
> Dump and load btmp, utmp and wtmp accounting files. More information:
> https://manned.org/utmpdump.
* Dump the `/var/log/wtmp` file to `stdout` as plain text:
`utmpdump {{/var/log/wtmp}}`
* Load a previously dumped file into `/var/log/wtmp`:
`utmpdump -r {{dumpfile}} > {{/var/log/wtmp}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-help | # git help
> Display help information about Git. More information: https://git-
> scm.com/docs/git-help.
* Display help about a specific Git subcommand:
`git help {{subcommand}}`
* Display help about a specific Git subcommand in a web browser:
`git help --web {{subcommand}}`
* Display a list of all available Git subcommands:
`git help --all`
* List the available guides:
`git help --guide`
* List all possible configuration variables:
`git help --config` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | printenv | # printenv
> Print values of all or specific environment variables. More information:
> https://www.gnu.org/software/coreutils/printenv.
* Display key-value pairs of all environment variables:
`printenv`
* Display the value of a specific variable:
`printenv {{HOME}}`
* Display the value of a variable and end with NUL instead of newline:
`printenv --null {{HOME}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | valgrind | # valgrind
> Wrapper for a set of expert tools for profiling, optimizing and debugging
> programs. Commonly used tools include `memcheck`, `cachegrind`, `callgrind`,
> `massif`, `helgrind`, and `drd`. More information: http://www.valgrind.org.
* Use the (default) Memcheck tool to show a diagnostic of memory usage by `program`:
`valgrind {{program}}`
* Use Memcheck to report all possible memory leaks of `program` in full detail:
`valgrind --leak-check=full --show-leak-kinds=all {{program}}`
* Use the Cachegrind tool to profile and log CPU cache operations of `program`:
`valgrind --tool=cachegrind {{program}}`
* Use the Massif tool to profile and log heap memory and stack usage of `program`:
`valgrind --tool=massif --stacks=yes {{program}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | loadkeys | # loadkeys
> Load the kernel keymap for the console. More information:
> https://manned.org/loadkeys.
* Load a default keymap:
`loadkeys --default`
* Load default keymap when an unusual keymap is loaded and `-` sign cannot be found:
`loadkeys defmap`
* Create a kernel source table:
`loadkeys --mktable`
* Create a binary keymap:
`loadkeys --bkeymap`
* Search and parse keymap without action:
`loadkeys --parse`
* Load the keymap suppressing all output:
`loadkeys --quiet`
* Load a keymap from the specified file for the console:
`loadkeys --console {{/dev/ttyN}} {{/path/to/file}}`
* Use standard names for keymaps of different locales:
`loadkeys --console {{/dev/ttyN}} {{uk}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | updatedb | # updatedb
> Create or update the database used by `locate`. It is usually run daily by
> cron. More information: https://manned.org/updatedb.
* Refresh database content:
`sudo updatedb`
* Display file names as soon as they are found:
`sudo updatedb --verbose` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | loginctl | # loginctl
> Manage the systemd login manager. More information:
> https://www.freedesktop.org/software/systemd/man/loginctl.html.
* Print all current sessions:
`loginctl list-sessions`
* Print all properties of a specific session:
`loginctl show-session {{session_id}} --all`
* Print all properties of a specific user:
`loginctl show-user {{username}}`
* Print a specific property of a user:
`loginctl show-user {{username}} --property={{property_name}}`
* Execute a `loginctl` operation on a remote host:
`loginctl list-users -H {{hostname}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | lastcomm | # lastcomm
> Show last commands executed. More information:
> https://manpages.debian.org/latest/acct/lastcomm.1.en.html.
* Print information about all the commands in the acct (record file):
`lastcomm`
* Display commands executed by a given user:
`lastcomm --user {{user}}`
* Display information about a given command executed on the system:
`lastcomm --command {{command}}`
* Display information about commands executed on a given terminal:
`lastcomm --tty {{terminal_name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | hostname | # hostname
> Show or set the system's host name. More information:
> https://manned.org/hostname.
* Show current host name:
`hostname`
* Show the network address of the host name:
`hostname -i`
* Show all network addresses of the host:
`hostname -I`
* Show the FQDN (Fully Qualified Domain Name):
`hostname --fqdn`
* Set current host name:
`hostname {{new_hostname}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-diff | # git diff
> Show changes to tracked files. More information: https://git-
> scm.com/docs/git-diff.
* Show unstaged, uncommitted changes:
`git diff`
* Show all uncommitted changes (including staged ones):
`git diff HEAD`
* Show only staged (added, but not yet committed) changes:
`git diff --staged`
* Show changes from all commits since a given date/time (a date expression, e.g. "1 week 2 days" or an ISO date):
`git diff 'HEAD@{3 months|weeks|days|hours|seconds ago}'`
* Show only names of changed files since a given commit:
`git diff --name-only {{commit}}`
* Output a summary of file creations, renames and mode changes since a given commit:
`git diff --summary {{commit}}`
* Compare a single file between two branches or commits:
`git diff {{branch_1}}..{{branch_2}} [--] {{path/to/file}}`
* Compare different files from the current branch to other branch:
`git diff {{branch}}:{{path/to/file2}} {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | uuencode | # uuencode
> Encode binary files into ASCII for transport via mediums that only support
> simple ASCII encoding. More information: https://manned.org/uuencode.
* Encode a file and print the result to `stdout`:
`uuencode {{path/to/input_file}} {{output_file_name_after_decoding}}`
* Encode a file and write the result to a file:
`uuencode -o {{path/to/output_file}} {{path/to/input_file}}
{{output_file_name_after_decoding}}`
* Encode a file using Base64 instead of the default uuencode encoding and write the result to a file:
`uuencode -m -o {{path/to/output_file}} {{path/to/input_file}}
{{output_file_name_after_decoding}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | uudecode | # uudecode
> Decode files encoded by `uuencode`. More information:
> https://manned.org/uudecode.
* Decode a file that was encoded with `uuencode` and print the result to `stdout`:
`uudecode {{path/to/encoded_file}}`
* Decode a file that was encoded with `uuencode` and write the result to a file:
`uudecode -o {{path/to/decoded_file}} {{path/to/encoded_file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | unexpand | # unexpand
> Convert spaces to tabs. More information:
> https://www.gnu.org/software/coreutils/unexpand.
* Convert blanks in each file to tabs, writing to `stdout`:
`unexpand {{path/to/file}}`
* Convert blanks to tabs, reading from `stdout`:
`unexpand`
* Convert all blanks, instead of just initial blanks:
`unexpand -a {{path/to/file}}`
* Convert only leading sequences of blanks (overrides -a):
`unexpand --first-only {{path/to/file}}`
* Have tabs a certain number of characters apart, not 8 (enables -a):
`unexpand -t {{number}} {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-show | # git show
> Show various types of Git objects (commits, tags, etc.). More information:
> https://git-scm.com/docs/git-show.
* Show information about the latest commit (hash, message, changes, and other metadata):
`git show`
* Show information about a given commit:
`git show {{commit}}`
* Show information about the commit associated with a given tag:
`git show {{tag}}`
* Show information about the 3rd commit from the HEAD of a branch:
`git show {{branch}}~{{3}}`
* Show a commit's message in a single line, suppressing the diff output:
`git show --oneline -s {{commit}}`
* Show only statistics (added/removed characters) about the changed files:
`git show --stat {{commit}}`
* Show only the list of added, renamed or deleted files:
`git show --summary {{commit}}`
* Show the contents of a file as it was at a given revision (e.g. branch, tag or commit):
`git show {{revision}}:{{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | basename | # basename
> Remove leading directory portions from a path. More information:
> https://www.gnu.org/software/coreutils/basename.
* Show only the file name from a path:
`basename {{path/to/file}}`
* Show only the rightmost directory name from a path:
`basename {{path/to/directory/}}`
* Show only the file name from a path, with a suffix removed:
`basename {{path/to/file}} {{suffix}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-init | # git init
> Initializes a new local Git repository. More information: https://git-
> scm.com/docs/git-init.
* Initialize a new local repository:
`git init`
* Initialize a repository with the specified name for the initial branch:
`git init --initial-branch={{branch_name}}`
* Initialize a repository using SHA256 for object hashes (requires Git version 2.29+):
`git init --object-format={{sha256}}`
* Initialize a barebones repository, suitable for use as a remote over ssh:
`git init --bare` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | localectl | # localectl
> Control the system locale and keyboard layout settings. More information:
> https://www.freedesktop.org/software/systemd/man/localectl.html.
* Show the current settings of the system locale and keyboard mapping:
`localectl`
* List available locales:
`localectl list-locales`
* Set a system locale variable:
`localectl set-locale {{LANG}}={{en_US.UTF-8}}`
* List available keymaps:
`localectl list-keymaps`
* Set the system keyboard mapping for the console and X11:
`localectl set-keymap {{us}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-stash | # git stash
> Stash local Git changes in a temporary area. More information: https://git-
> scm.com/docs/git-stash.
* Stash current changes, except new (untracked) files:
`git stash push -m {{optional_stash_message}}`
* Stash current changes, including new (untracked) files:
`git stash -u`
* Interactively select parts of changed files for stashing:
`git stash -p`
* List all stashes (shows stash name, related branch and message):
`git stash list`
* Show the changes as a patch between the stash (default is stash@{0}) and the commit back when stash entry was first created:
`git stash show -p {{stash@{0}}}`
* Apply a stash (default is the latest, named stash@{0}):
`git stash apply {{optional_stash_name_or_commit}}`
* Drop or apply a stash (default is stash@{0}) and remove it from the stash list if applying doesn't cause conflicts:
`git stash pop {{optional_stash_name}}`
* Drop all stashes:
`git stash clear` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ssh-agent | # ssh-agent
> Spawn an SSH Agent process. An SSH Agent holds SSH keys decrypted in memory
> until removed or the process is killed. See also `ssh-add`, which can add
> and manage keys held by an SSH Agent. More information:
> https://man.openbsd.org/ssh-agent.
* Start an SSH Agent for the current shell:
`eval $(ssh-agent)`
* Kill the currently running agent:
`ssh-agent -k` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-merge | # git merge
> Merge branches. More information: https://git-scm.com/docs/git-merge.
* Merge a branch into your current branch:
`git merge {{branch_name}}`
* Edit the merge message:
`git merge --edit {{branch_name}}`
* Merge a branch and create a merge commit:
`git merge --no-ff {{branch_name}}`
* Abort a merge in case of conflicts:
`git merge --abort`
* Merge using a specific strategy:
`git merge --strategy {{strategy}} --strategy-option {{strategy_option}}
{{branch_name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sha384sum | # sha384sum
> Calculate SHA384 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA384 checksum for one or more files:
`sha384sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA384 checksums to a file:
`sha384sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha384}}`
* Calculate a SHA384 checksum from `stdin`:
`{{command}} | sha384sum`
* Read a file of SHA384 sums and filenames and verify all files have matching checksums:
`sha384sum --check {{path/to/file.sha384}}`
* Only show a message for missing files or when verification fails:
`sha384sum --check --quiet {{path/to/file.sha384}}`
* Only show a message when verification fails, ignoring missing files:
`sha384sum --ignore-missing --check --quiet {{path/to/file.sha384}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-notes | # git notes
> Add or inspect object notes. More information: https://git-scm.com/docs/git-
> notes.
* List all notes and the objects they are attached to:
`git notes list`
* List all notes attached to a given object (defaults to HEAD):
`git notes list [{{object}}]`
* Show the notes attached to a given object (defaults to HEAD):
`git notes show [{{object}}]`
* Append a note to a specified object (opens the default text editor):
`git notes append {{object}}`
* Append a note to a specified object, specifying the message:
`git notes append --message="{{message_text}}"`
* Edit an existing note (defaults to HEAD):
`git notes edit [{{object}}]`
* Copy a note from one object to another:
`git notes copy {{source_object}} {{target_object}}`
* Remove all the notes added to a specified object:
`git notes remove {{object}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | systemctl | # systemctl
> Control the systemd system and service manager. More information:
> https://www.freedesktop.org/software/systemd/man/systemctl.html.
* Show all running services:
`systemctl status`
* List failed units:
`systemctl --failed`
* Start/Stop/Restart/Reload a service:
`systemctl {{start|stop|restart|reload}} {{unit}}`
* Show the status of a unit:
`systemctl status {{unit}}`
* Enable/Disable a unit to be started on bootup:
`systemctl {{enable|disable}} {{unit}}`
* Mask/Unmask a unit to prevent enablement and manual activation:
`systemctl {{mask|unmask}} {{unit}}`
* Reload systemd, scanning for new or changed units:
`systemctl daemon-reload`
* Check if a unit is enabled:
`systemctl is-enabled {{unit}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-stage | # git stage
> Add file contents to the staging area. Synonym of `git add`. More
> information: https://git-scm.com/docs/git-stage.
* Add a file to the index:
`git stage {{path/to/file}}`
* Add all files (tracked and untracked):
`git stage -A`
* Only add already tracked files:
`git stage -u`
* Also add ignored files:
`git stage -f`
* Interactively stage parts of files:
`git stage -p`
* Interactively stage parts of a given file:
`git stage -p {{path/to/file}}`
* Interactively stage a file:
`git stage -i` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sha224sum | # sha224sum
> Calculate SHA224 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA224 checksum for one or more files:
`sha224sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA224 checksums to a file:
`sha224sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha224}}`
* Calculate a SHA224 checksum from `stdin`:
`{{command}} | sha224sum`
* Read a file of SHA224 sums and filenames and verify all files have matching checksums:
`sha224sum --check {{path/to/file.sha224}}`
* Only show a message for missing files or when verification fails:
`sha224sum --check --quiet {{path/to/file.sha224}}`
* Only show a message when verification fails, ignoring missing files:
`sha224sum --ignore-missing --check --quiet {{path/to/file.sha224}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dircolors | # dircolors
> Output commands to set the LS_COLOR environment variable and style `ls`,
> `dir`, etc. More information:
> https://www.gnu.org/software/coreutils/dircolors.
* Output commands to set LS_COLOR using default colors:
`dircolors`
* Output commands to set LS_COLOR using colors from a file:
`dircolors {{path/to/file}}`
* Output commands for Bourne shell:
`dircolors --bourne-shell`
* Output commands for C shell:
`dircolors --c-shell`
* View the default colors for file types and extensions:
`dircolors --print-data` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-fetch | # git fetch
> Download objects and refs from a remote repository. More information:
> https://git-scm.com/docs/git-fetch.
* Fetch the latest changes from the default remote upstream repository (if set):
`git fetch`
* Fetch new branches from a specific remote upstream repository:
`git fetch {{remote_name}}`
* Fetch the latest changes from all remote upstream repositories:
`git fetch --all`
* Also fetch tags from the remote upstream repository:
`git fetch --tags`
* Delete local references to remote branches that have been deleted upstream:
`git fetch --prune` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sha256sum | # sha256sum
> Calculate SHA256 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA256 checksum for one or more files:
`sha256sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA256 checksums to a file:
`sha256sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha256}}`
* Calculate a SHA256 checksum from `stdin`:
`{{command}} | sha256sum`
* Read a file of SHA256 sums and filenames and verify all files have matching checksums:
`sha256sum --check {{path/to/file.sha256}}`
* Only show a message for missing files or when verification fails:
`sha256sum --check --quiet {{path/to/file.sha256}}`
* Only show a message when verification fails, ignoring missing files:
`sha256sum --ignore-missing --check --quiet {{path/to/file.sha256}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | fallocate | # fallocate
> Reserve or deallocate disk space to files. The utility allocates space
> without zeroing. More information: https://manned.org/fallocate.
* Reserve a file taking up 700 MiB of disk space:
`fallocate --length {{700M}} {{path/to/file}}`
* Shrink an already allocated file by 200 MiB:
`fallocate --collapse-range --length {{200M}} {{path/to/file}}`
* Shrink 20 MB of space after 100 MiB in a file:
`fallocate --collapse-range --offset {{100M}} --length {{20M}}
{{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-blame | # git blame
> Show commit hash and last author on each line of a file. More information:
> https://git-scm.com/docs/git-blame.
* Print file with author name and commit hash on each line:
`git blame {{path/to/file}}`
* Print file with author email and commit hash on each line:
`git blame -e {{path/to/file}}`
* Print file with author name and commit hash on each line at a specific commit:
`git blame {{commit}} {{path/to/file}}`
* Print file with author name and commit hash on each line before a specific commit:
`git blame {{commit}}~ {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | trace-cmd | # trace-cmd
> Utility to interact with the Ftrace Linux kernel internal tracer. This
> utility only runs as root. More information: https://manned.org/trace-cmd.
* Display the status of tracing system:
`trace-cmd stat`
* List available tracers:
`trace-cmd list -t`
* Start tracing with a specific plugin:
`trace-cmd start -p
{{timerlat|osnoise|hwlat|blk|mmiotrace|function_graph|wakeup_dl|wakeup_rt|wakeup|function|nop}}`
* View the trace output:
`trace-cmd show`
* Stop the tracing but retain the buffers:
`trace-cmd stop`
* Clear the trace buffers:
`trace-cmd clear`
* Clear the trace buffers and stop tracing:
`trace-cmd reset` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-apply | # git apply
> Apply a patch to files and/or to the index without creating a commit. See
> also `git am`, which applies a patch and also creates a commit. More
> information: https://git-scm.com/docs/git-apply.
* Print messages about the patched files:
`git apply --verbose {{path/to/file}}`
* Apply and add the patched files to the index:
`git apply --index {{path/to/file}}`
* Apply a remote patch file:
`curl -L {{https://example.com/file.patch}} | git apply`
* Output diffstat for the input and apply the patch:
`git apply --stat --apply {{path/to/file}}`
* Apply the patch in reverse:
`git apply --reverse {{path/to/file}}`
* Store the patch result in the index without modifying the working tree:
`git apply --cache {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-reset | # git reset
> Undo commits or unstage changes, by resetting the current Git HEAD to the
> specified state. If a path is passed, it works as "unstage"; if a commit
> hash or branch is passed, it works as "uncommit". More information:
> https://git-scm.com/docs/git-reset.
* Unstage everything:
`git reset`
* Unstage specific file(s):
`git reset {{path/to/file1 path/to/file2 ...}}`
* Interactively unstage portions of a file:
`git reset --patch {{path/to/file}}`
* Undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem:
`git reset HEAD~`
* Undo the last two commits, adding their changes to the index, i.e. staged for commit:
`git reset --soft HEAD~2`
* Discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`):
`git reset --hard`
* Reset the repository to a given commit, discarding committed, staged and uncommitted changes since then:
`git reset --hard {{commit}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-prune | # git prune
> Git command for pruning all unreachable objects from the object database.
> This command is often not used directly but as an internal command that is
> used by Git gc. More information: https://git-scm.com/docs/git-prune.
* Report what would be removed by Git prune without removing it:
`git prune --dry-run`
* Prune unreachable objects and display what has been pruned to `stdout`:
`git prune --verbose`
* Prune unreachable objects while showing progress:
`git prune --progress` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-clean | # git clean
> Remove untracked files from the working tree. More information: https://git-
> scm.com/docs/git-clean.
* Delete files that are not tracked by Git:
`git clean`
* Interactively delete files that are not tracked by Git:
`git clean -i`
* Show what files would be deleted without actually deleting them:
`git clean --dry-run`
* Forcefully delete files that are not tracked by Git:
`git clean -f`
* Forcefully delete directories that are not tracked by Git:
`git clean -fd`
* Delete untracked files, including ignored files in `.gitignore` and `.git/info/exclude`:
`git clean -x` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sha512sum | # sha512sum
> Calculate SHA512 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA512 checksum for one or more files:
`sha512sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA512 checksums to a file:
`sha512sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha512}}`
* Calculate a SHA512 checksum from `stdin`:
`{{command}} | sha512sum`
* Read a file of SHA512 sums and filenames and verify all files have matching checksums:
`sha512sum --check {{path/to/file.sha512}}`
* Only show a message for missing files or when verification fails:
`sha512sum --check --quiet {{path/to/file.sha512}}`
* Only show a message when verification fails, ignoring missing files:
`sha512sum --ignore-missing --check --quiet {{path/to/file.sha512}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-clone | # git clone
> Clone an existing repository. More information: https://git-
> scm.com/docs/git-clone.
* Clone an existing repository into a new directory (the default directory is the repository name):
`git clone {{remote_repository_location}} {{path/to/directory}}`
* Clone an existing repository and its submodules:
`git clone --recursive {{remote_repository_location}}`
* Clone only the `.git` directory of an existing repository:
`git clone --no-checkout {{remote_repository_location}}`
* Clone a local repository:
`git clone --local {{path/to/local/repository}}`
* Clone quietly:
`git clone --quiet {{remote_repository_location}}`
* Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time):
`git clone --depth {{10}} {{remote_repository_location}}`
* Clone an existing repository only fetching a specific branch:
`git clone --branch {{name}} --single-branch {{remote_repository_location}}`
* Clone an existing repository using a specific SSH command:
`git clone --config core.sshCommand="{{ssh -i path/to/private_ssh_key}}"
{{remote_repository_location}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-config | # git config
> Manage custom configuration options for Git repositories. These
> configurations can be local (for the current repository) or global (for the
> current user). More information: https://git-scm.com/docs/git-config.
* List only local configuration entries (stored in `.git/config` in the current repository):
`git config --list --local`
* List only global configuration entries (stored in `~/.gitconfig` by default or in `$XDG_CONFIG_HOME/git/config` if such a file exists):
`git config --list --global`
* List only system configuration entries (stored in `/etc/gitconfig`), and show their file location:
`git config --list --system --show-origin`
* Get the value of a given configuration entry:
`git config alias.unstage`
* Set the global value of a given configuration entry:
`git config --global alias.unstage "reset HEAD --"`
* Revert a global configuration entry to its default value:
`git config --global --unset alias.unstage`
* Edit the Git configuration for the current repository in the default editor:
`git config --edit`
* Edit the global Git configuration in the default editor:
`git config --global --edit` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-column | # git column
> Display data in columns. More information: https://git-scm.com/docs/git-
> column.
* Format `stdin` as multiple columns:
`ls | git column --mode={{column}}`
* Format `stdin` as multiple columns with a maximum width of `100`:
`ls | git column --mode=column --width={{100}}`
* Format `stdin` as multiple columns with a maximum padding of `30`:
`ls | git column --mode=column --padding={{30}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-reflog | # git reflog
> Show a log of changes to local references like HEAD, branches or tags. More
> information: https://git-scm.com/docs/git-reflog.
* Show the reflog for HEAD:
`git reflog`
* Show the reflog for a given branch:
`git reflog {{branch_name}}`
* Show only the 5 latest entries in the reflog:
`git reflog -n {{5}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-switch | # git switch
> Switch between Git branches. Requires Git version 2.23+. See also `git
> checkout`. More information: https://git-scm.com/docs/git-switch.
* Switch to an existing branch:
`git switch {{branch_name}}`
* Create a new branch and switch to it:
`git switch --create {{branch_name}}`
* Create a new branch based on an existing commit and switch to it:
`git switch --create {{branch_name}} {{commit}}`
* Switch to the previous branch:
`git switch -`
* Switch to a branch and update all submodules to match:
`git switch --recurse-submodules {{branch_name}}`
* Switch to a branch and automatically merge the current branch and any uncommitted changes into it:
`git switch --merge {{branch_name}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git-status | # git status
> Show the changes to files in a Git repository. Lists changed, added and
> deleted files compared to the currently checked-out commit. More
> information: https://git-scm.com/docs/git-status.
* Show changed files which are not yet added for commit:
`git status`
* Give output in [s]hort format:
`git status -s`
* Don't show untracked files in the output:
`git status --untracked-files=no`
* Show output in [s]hort format along with [b]ranch info:
`git status -sb` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ssh-keygen | # ssh-keygen
> Generate ssh keys used for authentication, password-less logins, and other
> things. More information: https://man.openbsd.org/ssh-keygen.
* Generate a key interactively:
`ssh-keygen`
* Generate an ed25519 key with 32 key derivation function rounds and save the key to a specific file:
`ssh-keygen -t {{ed25519}} -a {{32}} -f {{~/.ssh/filename}}`
* Generate an RSA 4096-bit key with email as a comment:
`ssh-keygen -t {{rsa}} -b {{4096}} -C "{{comment|email}}"`
* Remove the keys of a host from the known_hosts file (useful when a known host has a new key):
`ssh-keygen -R {{remote_host}}`
* Retrieve the fingerprint of a key in MD5 Hex:
`ssh-keygen -l -E {{md5}} -f {{~/.ssh/filename}}`
* Change the password of a key:
`ssh-keygen -p -f {{~/.ssh/filename}}`
* Change the type of the key format (for example from OPENSSH format to PEM), the file will be rewritten in-place:
`ssh-keygen -p -N "" -m {{PEM}} -f {{~/.ssh/OpenSSH_private_key}}`
* Retrieve public key from secret key:
`ssh-keygen -y -f {{~/.ssh/OpenSSH_private_key}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | resolvectl | # resolvectl
> Resolve domain names, IPv4 and IPv6 addresses, DNS resource records, and
> services. Introspect and reconfigure the DNS resolver. More information:
> https://www.freedesktop.org/software/systemd/man/resolvectl.html.
* Show DNS settings:
`resolvectl status`
* Resolve the IPv4 and IPv6 addresses for one or more domains:
`resolvectl query {{domain1 domain2 ...}}`
* Retrieve the domain of a specified IP address:
`resolvectl query {{ip_address}}`
* Retrieve an MX record of a domain:
`resolvectl --legend={{no}} --type={{MX}} query {{domain}}`
* Resolve an SRV record, for example _xmpp-server._tcp gmail.com:
`resolvectl service _{{service}}._{{protocol}} {{name}}`
* Retrieve the public key from an email address from an OPENPGPKEY DNS record:
`resolvectl openpgp {{email}}`
* Retrieve a TLS key:
`resolvectl tlsa tcp {{domain}}:443` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dpkg-query | # dpkg-query
> A tool that shows information about installed packages. More information:
> https://manpages.debian.org/latest/dpkg/dpkg-query.1.html.
* List all installed packages:
`dpkg-query --list`
* List installed packages matching a pattern:
`dpkg-query --list '{{libc6*}}'`
* List all files installed by a package:
`dpkg-query --listfiles {{libc6}}`
* Show information about a package:
`dpkg-query --status {{libc6}}`
* Search for packages that own files matching a pattern:
`dpkg-query --search {{/etc/ld.so.conf.d}}` |
Subsets and Splits