# Linux Commands

ls - list the files and directories (folders) that are available on the machine

pwd - present working directory

###   
File and Directory Management 

ls – List directory contents.

cd – Change the current directory.

pwd – Print the working directory.

mkdir – Create a new directory.

rmdir – Remove an empty directory.

rm – Remove files or directories.

cp – Copy files or directories.

mv – Move or rename files.

touch – Create an empty file.

find – Search for files in a directory hierarchy.

locate – Find files quickly using an index.

tree – View directory structure in tree format.

File Viewing and Editing

cat – Concatenate and display file content.

less – View file content one screen at a time.

more – Similar to less but with limited functionality.

head – View the first few lines of a file.

tail – View the last few lines of a file.

nano/vi/vim – Text editors.

File Permissions and Ownership

chmod – Change file permissions.

chown – Change file owner or group.

ls -l – View file permissions.

Process Management

ps – View running processes.

top/htop – Interactive process viewer.

kill – Terminate a process by PID.

kill all – Terminate processes by name.

bg/fg – Manage background and foreground processes.

jobs – View background jobs.

Disk Usage

df – Show disk space usage.

du – Show directory or file size.

mount/umount – Mount or unmount filesystems.

Networking

ping – Test network connectivity.

ifconfig/ip – Configure network interfaces.

wget – Download files from the web.

curl – Transfer data from or to a server.

scp – Secure copy files between hosts.

ssh – Securely connect to a remote host.

netstat/ss – Network statistics.

User Management

who – Show who is logged in.

whoami – Show current user.

su – Switch user.

sudo – Run commands as another user.

passwd – Change user password.

System Monitoring

uptime – Show system uptime.

dmesg – View kernel messages.

free – Display memory usage.

vmstat – View system performance statistics.

Archiving and Compression

tar – Archive files.

gzip/gunzip – Compress or decompress files.

zip/unzip – Compress or extract ZIP files.

Package Management (varies by distro)

apt – For Debian-based systems (e.g., Ubuntu).

yum/dnf – For Red Hat-based systems (e.g., Fedora).

zypper – For SUSE systems.

Miscellaneous

echo – Display text or variables.

date – Show or set system date and time.

cal – Display a calendar.

history – Show command history.

alias – Create command shortcuts.

uname – Display system information.

man – Show manual for a command.

Would you like further elaboration on any specific commands?

Sort, uniq, grep, awk, sed, whereis, whatis, tee, hostname, chage, clear, crontab, cut, paste

Egrep, pgrep, file, groups, cat /etc/os-release, cat /etc/shadow, cat /etc/group,

Soft link, hard link, hostnamectl, id, lsblk, 

Chgrp, diff, wc, w, users, last, zcat, agrep, groupadd, usermod, lid, userdel, groupdel, shutdown

Reset, sleep, split, systemctl, tac, which

File and Text Processing

sort: Arrange lines of text files in order.

uniq: Remove duplicate lines from sorted input.

grep: Search for a pattern in files.

egrep: Extended version of grep supporting more patterns.

awk: Pattern scanning and processing language.

sed: Stream editor for text manipulation.

cut: Extract specific sections from input.

paste: Merge lines from different files.

cat: Display file contents or concatenate files.

tac: Display file contents in reverse order.

wc: Count lines, words, or characters in a file.

zcat: View the contents of compressed files without decompressing.

agrep: Approximate grep, allowing for typos.

\---

File and System Information

file: Determine the type of a file.

lsblk: List information about block devices.

hostname: Display or set the system hostname.

hostnamectl: Manage the hostname and related settings.

id: Display user ID, group ID, and other related information.

whereis: Locate binaries, source, and manual files for a command.

whatis: Display a brief description of a command.

\---

User and Group Management

groups: Show groups a user belongs to.

groupadd: Add a new group.

groupdel: Delete an existing group.

userdel: Remove a user account.

usermod: Modify user account settings.

chage: Manage user password expiration.

lid: List user/group information.

users: List currently logged-in users.

last: Show login history.

\---

Links

soft link: A symbolic link pointing to a file or directory.

hard link: A direct reference to the data on disk (cannot link directories).

\---

Process Management

pgrep: Search for processes by name.

systemctl: Control systemd services.

shutdown: Power off or restart the system.

reset: Reset the terminal.

\---

Scheduling

crontab: Manage scheduled tasks for a user.

\---

Miscellaneous

chgrp: Change the group ownership of a file.

diff: Compare two files line by line.

clear: Clear the terminal screen.

split: Split a file into smaller parts.

sleep: Pause execution for a specified time.

tee: Redirect output to a file and also display it.
