Welcome to the Linux Cheatsheet project! This repository contains a collection of useful Linux commands and tips that can help you navigate and work efficiently within the Linux environment.
This cheatsheet is designed to provide quick reference to common Linux commands, configurations, and techniques. Whether you're a beginner learning the basics or an experienced user looking for quick reminders, this cheatsheet can be a handy resource.
You can navigate through the cheatsheet by browsing the markdown files in this repository or by using the table of contents above. Each command or tip is presented along with a brief explanation of its purpose and usage.
If you're looking for a specific command, you can use the search function of your browser (usually accessed with Ctrl + F
or Cmd + F
) to quickly locate what you need.
Feel free to clone, download, or fork this repository as you see fit. You can also contribute to this cheatsheet by adding new commands, improving explanations, or fixing errors.
Contributions to this cheatsheet are welcome! If you have a new command, tip, or improvement you'd like to suggest, here's how you can contribute:
- Fork this repository to your GitHub account.
- Create a new branch with a descriptive name (
git checkout -b new-command
). - Make your changes, add new content, or edit existing information.
- Commit your changes with a clear and concise message (
git commit -m "Add new command: explain_command_here"
). - Push your changes to your forked repository (
git push origin new-command
). - Open a pull request in this repository and describe your changes.
Please ensure that your contributions are well-documented and follow the style of the existing cheatsheet.
This project is licensed under the MIT License, which means you're free to use, modify, and distribute the contents of this repository for personal or commercial purposes. Attribution is appreciated but not required.
If you find this cheatsheet helpful, consider giving it a ⭐ to show your support!.
- Basic concepts.
- Advantages and disadvantages.
- Terminal and terminal emulators.
- Remote login (SSH).
- Command, options, and arguments.
- Basic syntax.
- Basic commands:
ls
,cd
,pwd
. - Absolute and relative directories.
- Creating and deleting files and directories:
touch
,mkdir
,rm
,rmdir
. - Moving and renaming:
mv
. - Copying:
cp
.
- Viewing file contents:
cat
,less
. - Command-line editors:
nano
,vim
.
- Redirecting output:
>
,>>
. - Pipelines:
|
.
- Basic permissions: read, write, execute.
- Changing permissions:
chmod
. - Changing owner and group:
chown
,chgrp
.
- Creating and deleting users and groups:
useradd
,userdel
,groupadd
,groupdel
. - Changing passwords:
passwd
.
- Viewing running processes:
ps
,top
,htop
. - Managing processes:
kill
,pkill
.
- Cron: scheduling tasks at specific times.
at
: executing commands at a future time.
- Viewing and configuring interfaces:
ifconfig
,ip
. - Connectivity testing:
ping
.
- Copying files over SSH:
scp
,rsync
. - Transferring files with
wget
andcurl
.
- Defining and using variables:
export
. - Creating aliases for commands:
alias
.
- Creating and executing scripts:
#!/bin/bash
. - Variables, control structures, and functions.
- Package management:
apt
,yum
,dnf
, etc. - Software installation and updates.
- Creating and mounting file systems:
mkfs
,mount
. - Managing storage space:
df
,du
.
- Firewalls:
iptables
,ufw
. - Security monitoring:
fail2ban
,auditd
.
- Advanced scripting: complex control structures.
- Automation with
cron
andsystemd
.
- Advanced string manipulation.
- Functions and libraries.
strace
,ltrace
,gdb
.