🚀Day 12 Linux cheat-sheet

CommandDescription
lsList files and directories in the current directory.
cd directoryChange to the specified directory.
pwdPrint the current working directory path.
mkdir directoryCreate a new directory.
rm fileRemove/delete a file.
rm -r directoryRemove a directory and its contents.
cp source destCopy files/directories from source to destination.
mv source destMove/rename files/directories.
find directory -name filenameSearch for files by name.

CommandDescription
cat fileDisplay the contents of a file.
grep pattern fileSearch for a pattern in a file.
less fileView file contents interactively.
head -n lines fileDisplay the first N lines of a file.
tail -n lines fileDisplay the last N lines of a file.
sort fileSort lines in a file.
sed 's/old/new/' fileStream editor for text manipulation.
awk '{ print $1 }' fileProcess and extract data from text files.

CommandDescription
psDisplay a list of currently running processes.
topMonitor system processes and resource usage.
df -hDisplay disk space usage in human-readable format.
du -h directoryDisplay directory space usage in human-readable format.
free -hDisplay memory usage.
uptimeDisplay system uptime and load averages.
netstat -tulnList open network ports.
whoDisplay users currently logged in.
wDisplay detailed information about logged-in users.
htopInteractive process viewer.

CommandDescription
chmod permissions fileChange file permissions.
chown user:group fileChange file ownership.
passwdChange the user password.
useradd usernameCreate a new user.
usermod -aG group usernameAdd the user to a group.
su usernameSwitch user or become superuser.
sudo commandExecute a command with superuser privileges.
groups usernameDisplay groups a user belongs to.
id usernameDisplay user and group information.

CommandDescription
ifconfigDisplay network interface information.
ip addrDisplay IP addresses and network interfaces.
ping hostnameSend ICMP echo requests to a host.
nslookup domainLook up DNS information for a domain.
ssh user@hostnameConnect to a remote server using SSH.
scp source destSecurely copy files between hosts.
curl URLTransfer data to or from a server.
wget URLDownload files from the internet.

CommandDescription
apt-get install pkgInstall a package using APT (Debian/Ubuntu).
yum install pkgInstall a package using YUM (CentOS/RHEL).
dnf install pkgInstall a package using DNF (Fedora).
apt-get updateUpdate package information (APT).
yum updateUpdate installed packages (YUM).
dnf updateUpdate installed packages (DNF).
apt-cache search pkgSearch for a package (APT).
rpm -qaList all installed packages (RPM).

CommandDescription
dateDisplay the current date and time.
calDisplay a calendar.
echo textPrint text to the terminal.
historyDisplay the command history.
man commandDisplay the manual page for a command.
aliasCreate custom command shortcuts.
shutdownShut down or restart the system.
rebootReboot the system.
uname -aDisplay system information.

Congratulations! 🎉

This comprehensive cheat sheet covers a variety of Linux commands categorized into different sections. Feel free to print or save it for quick reference! Remember to explore the manual pages (man command) for more detailed information on each command.

We hope this blog has given you a Question/Answer 🚀💪

🔍 Did you find this blog helpful? Let us know in the comments below! 👇 And if you have any questions or need further assistance, we're here to help! 🤗

Happy Learning! 💻✨