Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

Essential Unix Commands

50

Flashcards

0/50

Still learning
StarStarStarStar

ls

StarStarStarStar

Lists directory contents.

StarStarStarStar

pwd

StarStarStarStar

Prints the current working directory.

StarStarStarStar

cd <directory>

StarStarStarStar

Changes the current directory to <directory>.

StarStarStarStar

mkdir <directory>

StarStarStarStar

Creates a new directory named <directory>.

StarStarStarStar

rmdir <directory>

StarStarStarStar

Removes an empty directory.

StarStarStarStar

touch <file>

StarStarStarStar

Creates an empty file or updates the timestamp of an existing file.

StarStarStarStar

cp <source> <destination>

StarStarStarStar

Copies a file or directory from <source> to <destination>.

StarStarStarStar

mv <source> <destination>

StarStarStarStar

Moves or renames a file or directory from <source> to <destination>.

StarStarStarStar

rm <file>

StarStarStarStar

Removes a file.

StarStarStarStar

cat <file>

StarStarStarStar

Displays the contents of <file> to the terminal.

StarStarStarStar

less <file>

StarStarStarStar

View the contents of a text file one screen at a time.

StarStarStarStar

head <file>

StarStarStarStar

Outputs the first part of files.

StarStarStarStar

tail <file>

StarStarStarStar

Outputs the last part of files.

StarStarStarStar

grep '<pattern>' <file>

StarStarStarStar

Searches for <pattern> in the specified <file>. Outputs matching lines.

StarStarStarStar

find <directory> -name '<pattern>'

StarStarStarStar

Searches for files and directories in <directory> that match <pattern>.

StarStarStarStar

chmod <permissions> <file>

StarStarStarStar

Changes the file mode bits (permissions) of <file>.

StarStarStarStar

chown <owner>[:<group>] <file>

StarStarStarStar

Changes the owner (and optionally the group) of a file.

StarStarStarStar

df

StarStarStarStar

Reports file system disk space usage.

StarStarStarStar

du <path>

StarStarStarStar

Estimates the file space usage of <path>.

StarStarStarStar

top

StarStarStarStar

Displays real-time system summary and process information.

StarStarStarStar

ps

StarStarStarStar

Reports a snapshot of current processes.

StarStarStarStar

kill <pid>

StarStarStarStar

Sends a signal to the process with the specified process ID (pid).

StarStarStarStar

tar -cvf <name.tar> <files/directories>

StarStarStarStar

Creates an archive file named <name.tar> containing the specified files or directories.

StarStarStarStar

tar -xvf <name.tar>

StarStarStarStar

Extracts files from an archive named <name.tar>.

StarStarStarStar

echo <text>

StarStarStarStar

Displays a line of text to the standard output.

StarStarStarStar

which <command>

StarStarStarStar

Shows the full path of shell commands.

StarStarStarStar

whoami

StarStarStarStar

Displays the current user's identity.

StarStarStarStar

ssh <user>@<host>

StarStarStarStar

Remotely logs into <host> as <user> using the Secure Shell protocol.

StarStarStarStar

scp <source> <user>@<host>:<destination>

StarStarStarStar

Securely copies files between hosts on a network using the Secure Shell protocol (SSH).

StarStarStarStar

wget <url>

StarStarStarStar

Downloads files from the web.

StarStarStarStar

curl <url>

StarStarStarStar

Transfers data from or to a server, using one of the supported protocols (such as HTTP, HTTPS, FTP, and more).

StarStarStarStar

diff <file1> <file2>

StarStarStarStar

Compares two files line by line.

StarStarStarStar

chmod +x <file>

StarStarStarStar

Adds execute permissions to a file.

StarStarStarStar

export VAR=value

StarStarStarStar

Sets an environment variable VAR to a value, making it available to subprocesses.

StarStarStarStar

man <command>

StarStarStarStar

Displays the manual pages for <command>.

StarStarStarStar

alias <name>='<command>'

StarStarStarStar

Creates an alias <name> for a longer command <command>.

StarStarStarStar

unalias <name>

StarStarStarStar

Removes an alias named <name>.

StarStarStarStar

history

StarStarStarStar

Displays a list of previously executed commands.

StarStarStarStar

env

StarStarStarStar

Prints out a list of current environment variables.

StarStarStarStar

uname -a

StarStarStarStar

Displays comprehensive system information.

StarStarStarStar

ping <hostname>

StarStarStarStar

Sends ICMP ECHO_REQUEST packets to a network host to test connectivity.

StarStarStarStar

netstat

StarStarStarStar

Displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

StarStarStarStar

ifconfig

StarStarStarStar

Configures and displays network interface parameters.

StarStarStarStar

nslookup <hostname>

StarStarStarStar

Queries Internet domain name servers for information about <hostname>.

StarStarStarStar

dig <hostname>

StarStarStarStar

Performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.

StarStarStarStar

jobs

StarStarStarStar

Lists the jobs running in the background, displaying their status.

StarStarStarStar

fg %<jobnumber>

StarStarStarStar

Brings a background job to the foreground.

StarStarStarStar

bg %<jobnumber>

StarStarStarStar

Continues a stopped job by running it in the background.

StarStarStarStar

crontab -e

StarStarStarStar

Edits the current user's cron jobs.

StarStarStarStar

crontab -l

StarStarStarStar

Lists the cron jobs for the current user.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.