ZoyaPatel

Essential Linux Commands Every User Should Know

Mumbai

Linux is everywhere—from powering servers to running embedded systems—and while it can feel complex, learning a few core commands makes it much more approachable. These commands form the backbone of daily Linux use, helping you navigate files, manage processes, and interact with the system efficiently.

Navigating Files and Directories

  • ls – Lists files and directories.
  • cd – Changes the current working directory.
  • pwd – Prints the current directory path.

Example:

cd /home/user/Documents
ls
pwd

Working with Files

  • cp – Copies files or directories.
  • mv – Moves or renames files.
  • rm – Removes files or directories.
  • touch – Creates an empty file.

Example:

cp notes.txt backup.txt
mv backup.txt archive.txt
rm archive.txt

Searching and Filtering

  • grep – Searches text using patterns.
  • find – Locates files and directories.
  • wc – Counts words, lines, and characters.

Example:

grep "error" logfile.txt
find /home/user -name "*.txt"
wc -l notes.txt

Permissions and Ownership

  • chmod – Changes file permissions.
  • chown – Changes file ownership.
  • whoami – Displays the current user.

Example:

chmod 755 script.sh
chown user:user script.sh
whoami

System and Process Management

  • ps – Lists running processes.
  • kill – Terminates processes.
  • top – Real-time process monitoring.
  • df – Shows disk space usage.
  • free – Displays memory usage.

Example:

ps aux
kill 1234
top
df -h
free -m

Networking Basics

  • ping – Tests connectivity.
  • curl – Transfers data from or to a server.
  • ssh – Connects to remote servers securely.

Example:

ping google.com
curl https://example.com
ssh user@192.168.1.10

Getting Help

  • man – Displays manual pages for commands.
  • --help – Provides quick usage information.
  • history – Shows previously executed commands.

Example:

man ls
ls --help
history

Keep Exploring Linux

These commands are just the beginning. As you grow more comfortable, you’ll discover powerful tools for automation, scripting, and system administration. Linux is vast, and every command you learn opens the door to new possibilities. Keep experimenting, keep practicing, and keep exploring—the more you use Linux, the more capable and confident you’ll become.



Ahmedabad