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

Linux Commands Cheat Sheet

This document provides a comprehensive list of basic and useful Linux commands categorized into navigation, file operations, viewing files, searching, permissions, system info, and networking. Each command is accompanied by a brief description of its function. It serves as a quick reference guide for users to perform various tasks in a Linux environment.
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)
6 views2 pages

Linux Commands Cheat Sheet

This document provides a comprehensive list of basic and useful Linux commands categorized into navigation, file operations, viewing files, searching, permissions, system info, and networking. Each command is accompanied by a brief description of its function. It serves as a quick reference guide for users to perform various tasks in a Linux environment.
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/ 2

Basic and Useful Linux Commands

Navigation & Help

pwd - Print working directory

ls - List files and directories

cd - Change directory

man [command] - Show manual/help for a command

clear - Clear the terminal screen

File & Directory Operations

touch filename - Create a new empty file

mkdir dirname - Create a new directory

cp source destination - Copy files or directories

mv source destination - Move or rename files or directories

rm filename - Delete a file

rm -r dirname - Delete a directory and its contents

Viewing Files

cat filename - View contents of a file

less filename - Scroll through file content

head filename - View the first 10 lines

tail filename - View the last 10 lines

nano filename - Open file in simple text editor

Searching

find /path -name "file.txt" - Find files by name

grep "text" filename - Search for text in a file

Permissions & Ownership

chmod 755 file - Change file permissions

chown user:group file - Change file ownership

ls -l - List files with permissions and ownership info


Basic and Useful Linux Commands

System Info & Package Management

uname -a - System information

df -h - Disk space usage

top - View running processes

ps aux - List all processes

sudo apt update - Update package lists

sudo apt install package - Install a package

Networking

ping google.com - Test internet connection

ifconfig - Show IP address and network info

ip a - Show IP address and network info (modern)

netstat -tuln - Show listening ports

curl example.com - Fetch content from a URL

You might also like