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

Basic Linux Commands

This document provides a comprehensive list of Linux commands categorized into various sections such as Directory Commands, File Commands, Terminal and Help Commands, Information Commands, Process Management, Permission Management, System Information, Filter and Text Processing, and Shell Scripting and Text Utilities. Each command is accompanied by a brief description and instructions on how to execute it. Users are encouraged to practice these commands and refer to their manual pages for a deeper understanding.

Uploaded by

fenilp2046
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 views8 pages

Basic Linux Commands

This document provides a comprehensive list of Linux commands categorized into various sections such as Directory Commands, File Commands, Terminal and Help Commands, Information Commands, Process Management, Permission Management, System Information, Filter and Text Processing, and Shell Scripting and Text Utilities. Each command is accompanied by a brief description and instructions on how to execute it. Users are encouraged to practice these commands and refer to their manual pages for a deeper understanding.

Uploaded by

fenilp2046
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

Ahmedabad University

School of Engineering and Applied Science [Link] (CSE),


Course: CSE404- Operating Systems
Linux Commands

★ Strongly Suggested: Please execute each command and read its manual page
using man <command> to understand how it works and explore its options.
Directory Commands
Command Description How to execute command
or write output observation
here

ls List the content of a


directory

pwd Print working directory


on the terminal

cd Change directory

mkdir Create a new directory

rmdir Remove a directory if


its empty

File Commands
Command Description How to execute command
or write output observation
here

touch Create a new file

cp Copy files
rm Remove files

mv Move or Rename files


or directories.

cat View complete file content.

ln Create soft link and


hard links

stat Display detailed


information about a file

file Identify file type

Terminal and Help Commands


Command Description How to execute command
or write output observation
here

echo Display a message or


variable value

clear Clear the terminal screen

man Show the manual


for a command
mv Move or Rename files
or directories.

cat View complete file content.

alias Create shortcuts for


commands

unalias Remove defined alias

Information Commands
Command Description How to execute command
or write output observation
here

history Show previously used


commands

hostname Show the computer’s name

who List logged-in users

whoami Display the current user


id Show user ID and group ID

wc Count lines, words,


and characters in a
file

whatis Display a one-line


description of a command

which Show the path of a


command

Process Management
Command Description How to execute command
or write output observation
here

ps Show currently
running processes

top Real-time system


process viewer

htop Enhanced interactive


process viewer

kill Terminate a process


using its PID
killall Terminate processes
by name

exec Replace the shell with


a command

nice Start a process with a


priority

renice Change priority of a


running process

Permission Management
Command Description How to execute command
or write output observation
here

chmod Change file permissions

chown Change file owner

chgrp Change file group

passwd Change user password

umask Set default permissions


for new files
System Information
Command Description How to execute command
or write output observation
here

uname -a Show all system


information

df -h Show disk space


usage
(human-readable)

du -sh Show space used by

files/folders

free -h Display memory


usage (RAM)

uptime Show system uptime

lscpu Show CPU


architecture details

iostat Report CPU and I/O


statistics
vmstat Report virtual
memory statistics

Filter and Text Processing


Command Description How to execute command
or write output observation
here

grep Search for patterns in files

sort Sort lines in a file

head Show first 10 lines of a file

tail Show last 10 lines of a file

find Search for files in a


directory hierarchy

cmp Compare two files byte


by byte

diff Show differences


between two files

cut Extract specific


columns from a file
uniq Filter out repeated lines in
a file

Shell Scripting and Text Utilities


Command Description How to execute command
or write output observation
here

awk Pattern scanning and


text processing

sed Stream editor for


filtering and
transforming text

read Read user input in a


shell script

printf Format and print data

test Evaluate conditions


in scripts

You might also like