Introduction to UNIX
About Unix
Unix is a powerful operating system.
It supports multiple users and can run many tasks at the same time (multi-user,
multi-tasking).
Developed in the 1970s at AT&T Labs by Dennis M. Ritchie and Ken Thompson.
Key Features of Unix
Portability – can run on different machines.
Security – provides controlled access through permissions.
Hierarchical File System – organized structure.
Shell – command interpreter for user interaction.
Utilities & Programming environment – provides many built-in tools.
Commands:
chmod – change file permissions
chown – change file owner
whoami – show current user
id – display user identity
Important Notes
Unix/Linux commands are case-sensitive.
o Example: [Link] is different from [Link]
Basic Unix Commands
Files and Directories
Files = documents
Directories (folders) = drawers
Command Description
ls Lists files and folders in current directory
ls -l Lists files with details (permissions, size, date, etc.)
ls -a Lists all files including hidden ones
pwd Shows present working directory
cd Documents Move into Documents directory
cd .. Move up one level
cd ~ Go to home directory
mkdir NewFolder Creates a new folder
rmdir EmptyFolder Deletes an empty folder
touch [Link] Creates an empty file
cp [Link] [Link] Copies file
mv [Link] [Link] Renames file
rm [Link] Deletes file permanently
Viewing File Contents
Command Description
cat [Link] Displays content of file
more [Link] Shows content page by page
less [Link] Similar to more, with backward movement
More Useful Commands
Command Description
echo "Hello" Prints message
date Shows current date and time
cal Displays calendar
who Shows logged in users
uname -a Displays system information
clear Clears terminal screen
man command Shows manual/help for a command