Explore tens of thousands of sets crafted by our community.
Essential Unix Commands
50
Flashcards
0/50
rmdir <directory>
Removes an empty directory.
ps
Reports a snapshot of current processes.
tail <file>
Outputs the last part of files.
kill <pid>
Sends a signal to the process with the specified process ID (pid).
diff <file1> <file2>
Compares two files line by line.
uname -a
Displays comprehensive system information.
alias <name>='<command>'
Creates an alias <name> for a longer command <command>.
less <file>
View the contents of a text file one screen at a time.
env
Prints out a list of current environment variables.
bg %<jobnumber>
Continues a stopped job by running it in the background.
mkdir <directory>
Creates a new directory named <directory>.
cat <file>
Displays the contents of <file> to the terminal.
chown <owner>[:<group>] <file>
Changes the owner (and optionally the group) of a file.
wget <url>
Downloads files from the web.
chmod <permissions> <file>
Changes the file mode bits (permissions) of <file>.
crontab -e
Edits the current user's cron jobs.
pwd
Prints the current working directory.
head <file>
Outputs the first part of files.
du <path>
Estimates the file space usage of <path>.
which <command>
Shows the full path of shell commands.
whoami
Displays the current user's identity.
man <command>
Displays the manual pages for <command>.
nslookup <hostname>
Queries Internet domain name servers for information about <hostname>.
ls
Lists directory contents.
top
Displays real-time system summary and process information.
echo <text>
Displays a line of text to the standard output.
dig <hostname>
Performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.
jobs
Lists the jobs running in the background, displaying their status.
cd <directory>
Changes the current directory to <directory>.
find <directory> -name '<pattern>'
Searches for files and directories in <directory> that match <pattern>.
unalias <name>
Removes an alias named <name>.
fg %<jobnumber>
Brings a background job to the foreground.
touch <file>
Creates an empty file or updates the timestamp of an existing file.
scp <source> <user>@<host>:<destination>
Securely copies files between hosts on a network using the Secure Shell protocol (SSH).
history
Displays a list of previously executed commands.
cp <source> <destination>
Copies a file or directory from <source> to <destination>.
mv <source> <destination>
Moves or renames a file or directory from <source> to <destination>.
df
Reports file system disk space usage.
ping <hostname>
Sends ICMP ECHO_REQUEST packets to a network host to test connectivity.
netstat
Displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
tar -cvf <name.tar> <files/directories>
Creates an archive file named <name.tar> containing the specified files or directories.
tar -xvf <name.tar>
Extracts files from an archive named <name.tar>.
crontab -l
Lists the cron jobs for the current user.
curl <url>
Transfers data from or to a server, using one of the supported protocols (such as HTTP, HTTPS, FTP, and more).
export VAR=value
Sets an environment variable VAR to a value, making it available to subprocesses.
grep '<pattern>' <file>
Searches for <pattern> in the specified <file>. Outputs matching lines.
ssh <user>@<host>
Remotely logs into <host> as <user> using the Secure Shell protocol.
ifconfig
Configures and displays network interface parameters.
rm <file>
Removes a file.
chmod +x <file>
Adds execute permissions to a file.
© Hypatia.Tech. 2024 All rights reserved.