0% found this document useful (0 votes)
2 views3 pages

UNIX Commands Quick Reference

This document provides a quick reference guide for various UNIX commands categorized by their functions, including file and directory management, file viewing, permissions, searching, system information, input/output redirection, compression, user management, and miscellaneous commands. Each command is briefly described with its primary function. It serves as a handy tool for users needing to recall or learn UNIX command-line operations.

Uploaded by

Shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

UNIX Commands Quick Reference

This document provides a quick reference guide for various UNIX commands categorized by their functions, including file and directory management, file viewing, permissions, searching, system information, input/output redirection, compression, user management, and miscellaneous commands. Each command is briefly described with its primary function. It serves as a handy tool for users needing to recall or learn UNIX command-line operations.

Uploaded by

Shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

UNIX Commands - Quick Reference

File and Directory Commands


ls -: Lists files and directories.
cd -: Changes the current directory.
pwd -: Prints the current working directory.
mkdir -: Creates a new directory.
rmdir -: Removes an empty directory.
rm -: Deletes files or directories.
touch -: Creates an empty file or updates file timestamps.
cp -: Copies files or directories.
mv -: Moves or renames files or directories.
find -: Searches files and directories based on conditions.
tree -: Displays directory structure in tree format.

File Viewing and Content


cat -: Displays the content of a file.
more -: Views file content page by page (forward only).
less -: Views file content (forward and backward).
head -: Shows the first few lines of a file.
tail -: Shows the last few lines of a file.
wc -: Counts lines, words, and characters.
cut -: Extracts sections from each line of input.
sort -: Sorts lines of text files.
uniq -: Removes duplicate lines from a sorted file.
diff -: Compares two files line by line.

Permissions and Ownership


chmod -: Changes file permissions.
chown -: Changes file owner.
chgrp -: Changes group ownership.

Search and Filter


grep -: Searches text using patterns.
egrep -: Extended version of grep with support for regex.
awk -: Pattern scanning and processing language.
sed -: Stream editor for filtering and transforming text.

System Info and Process


ps -: Displays current running processes.
top -: Displays real-time system processes.
kill -: Sends a signal to terminate a process.
killall -: Kills all processes by name.
uname -: Shows system information.
uptime -: Shows how long the system has been running.
whoami -: Shows current logged-in user.
id -: Shows user ID and group ID.
df -: Shows disk space usage.
du -: Shows disk usage of files and directories.
free -: Displays memory usage.
date -: Displays or sets the system date and time.
cal -: Displays a calendar.

Input/Output and Redirection


> -: Redirects output to a file (overwrite).
>> -: Appends output to a file.
< -: Takes input from a file.
| -: Pipes output of one command to another.

Compression and Archiving


tar -: Archives multiple files into one.
gzip -: Compresses files.
gunzip -: Decompresses gzip files.
zip -: Compresses files into .zip.
unzip -: Extracts .zip files.

User Management
useradd -: Adds a new user.
passwd -: Changes a user's password.
usermod -: Modifies a user account.
userdel -: Deletes a user.
groupadd -: Creates a new group.

Miscellaneous
echo -: Displays a line of text.
history -: Shows command history.
clear -: Clears the terminal screen.
alias -: Creates shortcuts for commands.
man -: Shows the manual of a command.
exit -: Exits the terminal session.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy