0% found this document useful (0 votes)
18 views4 pages

Unix Commands

The document provides a comprehensive overview of various command-line commands used for file system navigation, file manipulation, process management, text processing, network communication, and system administration. Each command is accompanied by a brief description and an example of its usage. This serves as a quick reference guide for users to efficiently interact with the command line interface.

Uploaded by

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

Unix Commands

The document provides a comprehensive overview of various command-line commands used for file system navigation, file manipulation, process management, text processing, network communication, and system administration. Each command is accompanied by a brief description and an example of its usage. This serves as a quick reference guide for users to efficiently interact with the command line interface.

Uploaded by

Shanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

File System Navigation :

Command Description Example

cd Changes the current working directory. cd Documents

Lists files and directories in the current


ls
ls directory.

pwd Prints the current working directory. pwd

mkdir Creates a new directory. mkdir new_folder

rmdir Removes an empty directory. rmdir empty_folder

mv [Link]
Moves files or directories.
mv Documents/

File Manipulation

Command Description Example

Creates an empty file or updates the access


touch new_file.txt
touch and modification times.

cp [Link]
Copies files or directories.
cp [Link]

mv [Link]
Moves files or directories.
mv Documents
Command Description Example

rm Remove files or directories. rm old_file.txt

Concatenates files and displays their cat [Link]


cat contents. [Link]

head Displays the first few lines of a file. head [Link]

tail Displays the last few lines of a file. tail [Link]

Process Management

Command Description Example

Displays information about active processes,


ps aux
ps including their status and IDs.

Displays a dynamic real-time view of system


top
top processes and their resource usage.

Terminates processes using their process IDs


kill <pid>
kill (PIDs).

Sends signals to processes based on name or


pkill -9 firefox
pkill other attributes.

killall -9
Terminates processes by name.
killall firefox

renice Changes the priority of running processes. renice -n 10


Command Description Example

<pid>

Runs a command with modified scheduling nice -n 10


nice priority. command

pstree Displays running processes as a tree. pstree

Searches for processes by name or other


pgrep firefox
pgrep attributes.

Lists active jobs and their status in the current


jobs
jobs shell session.

Text Processing

Command Description Example

grep Searches for patterns in text files. grep "error" [Link]

Network Communication

Command Description Example

Tests connectivity with another host using ping


ping ICMP echo requests. [Link]

host Performs DNS lookups, displaying domain host


Command Description Example

name to IP address resolution. [Link]

hostname Displays or sets the system’s hostname. hostname

System Administration

Command Description Example

df Displays disk space usage. df -h

Displays disk usage of files and du -sh


du directories. /path/to/directory

You might also like