0% found this document useful (0 votes)
3 views2 pages

Essential Linux Commands for Beginners

basic linux commands

Uploaded by

Clement Okumu
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)
3 views2 pages

Essential Linux Commands for Beginners

basic linux commands

Uploaded by

Clement Okumu
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

Basic Linux Commands for Beginners

File and Directory Management


`pwd` → Shows your current working directory
`ls` → Lists files and folders
`ls -l` → Long listing (details)
`ls -a` → Shows hidden files too
`cd ` → Change directory
`cd ..` → Go back one directory
`cd ~` → Go to home directory
`mkdir ` → Create a new directory
`rmdir ` → Remove an empty directory
`touch ` → Create an empty file
`cp ` → Copy files
`mv ` → Move or rename files
`rm ` → Delete a file
`rm -r ` → Remove directory and contents

Viewing Files
`cat ` → Show file contents
`less ` → View file page by page (q to quit)
`head ` → Show first 10 lines
`tail ` → Show last 10 lines
`tail -f ` → Monitor file in real time

System Information
`whoami` → Shows current username
`uname -a` → Shows system information
`df -h` → Shows disk usage
`free -h` → Shows memory usage
`top` → Shows running processes (q to quit)
`date` → Shows current date and time
`uptime` → Shows system uptime

Permissions
`ls -l` → Shows file permissions
`chmod ` → Change file permissions
`chown : ` → Change file owner

Searching and Finding


`find -name ` → Search for a file
`grep ` → Search for a word in a file

Package Management (Ubuntu/Debian)


`sudo apt update` → Update package list
`sudo apt upgrade` → Upgrade installed packages
`sudo apt install ` → Install a package
`sudo apt remove ` → Remove a package

Others
`man ` → Manual/help for a command
`clear` → Clear the terminal screen
`history` → Show previously used commands
`exit` → Close terminal session

You might also like