Cheat Sheet in Image Format
Essential Linux Commands with Examples
Linux commands are the backbone of managing and interacting with a Linux-based operating system. Whether you're a beginner or an advanced user, mastering these commands can greatly enhance your productivity. Below is a list of essential commands categorized with their descriptions and examples.
1. File and Directory Commands
ls
– List Files and Directories
Displays the files and directories in the current directory.
Example:
If you run ls -l
in /home/user
, it might display:
cd
– Change Directory
Moves to a specified directory.
Example:
mkdir
– Create a Directory
Creates a new folder.
Example:
Running mkdir projects
creates a folder named projects
in the current directory.
pwd
– Print Working Directory
Displays the full path of your current directory.
Example:
If you're in /home/user
, the output will be:
2. File Operations
touch
– Create a File
Creates an empty file.
Example:
Running touch report.txt
creates an empty file named report.txt
in the current directory.
cp
– Copy Files
Copies files or directories.
Example:
mv
– Move or Rename Files
Renames or moves a file or directory.
Example:
rm
– Remove Files
Deletes files or directories.
Example:
3. Viewing File Contents
cat
– Display File Contents
Shows the content of a file.
Example:
If file.txt
contains "Hello, World!", running cat file.txt
will display:
grep
– Search Within Files
Searches for specific patterns in a file.
Example:
4. User Management
whoami
– Display Current User
Shows the username of the logged-in user.
Example:
Running whoami
might output:
5. Process Management
ps
– Display Running Processes
Lists active processes.
Example:
kill
– Terminate Processes
Stops a process by its process ID (PID).
Example:
6. Disk and System Information
df
– Display Disk Usage
Shows how much disk space is used and available.
Example:
uname
– System Information
Displays details about the operating system.
Example:
7. Networking Commands
ping
– Test Network Connectivity
Checks the connection to a host.
Example:
curl
– Fetch Data from a URL
Transfers data from or to a server.
Example:
Running curl https://api.github.com
fetches API data from GitHub.
Conclusion
This cheat sheet provides a handy reference to commonly used Linux commands. With these commands, you can easily manage files, processes, users, and networks on your Linux system. Bookmark this for quick access, and let me know if you’d like more commands or tips!
Before studying at the university, they said that it would be so difficult, and in order to somehow help myself in my studies, I began to use the fact that there are master papers reviews, it helps me in doing any written work
ReplyDeleteทางเข้า pg slot 88 แล้วกรอกข้อมูลส่วนตัวของคุณลงในฟอร์มการสมัคร หลังจากนั้นก็เสร็จสิ้นขั้นตอนการสมัครแล้ว pg slot คุณจะได้รับชื่อผู้ใช้งานและรหัสผ่านเข้าสู่ระบบจากนั้นคุณก็สามารถเลือกเกมสล็อต
ReplyDelete