sammlinux sammlinux
  • Ubuntu
    UbuntuShow More
    How To Install and Use Docker CE on Ubuntu 22.04
    26 Min Read
    How To Install and Secure phpMyAdmin on Ubuntu 22.04
    5 Min Read
    How To Secure SSH with Fail2Ban on Ubuntu 22.04
    8 Min Read
    How To Install Uptime Kuma on Ubuntu 22.04
    17 Min Read
    How To Install Ubuntu Server 22.04 LTS with Screenshots
    14 Min Read
  • Rocky Linux
    Rocky LinuxShow More
    How To Install phpMyAdmin on Rocky Linux 9
    15 Min Read
    How To Secure SSH with Fail2Ban on Rocky Linux 9
    12 Min Read
    How To Install Rocky Linux 9.2 Server with Screenshots
    12 Min Read
    How To Set Up a Firewall Using FirewallD on Rocky Linux 9
    8 Min Read
    How To Install Nginx on Rocky Linux 9: A Comprehensive Guide
    10 Min Read
  • Debian
    DebianShow More
    How To Secure SSH with Fail2Ban on Debian 11
    8 Min Read
    How To Install Debian 11 (Bullseye) Server with Pictures
    12 Min Read
    How To Install and Setup Node.js on Debian 11
    6 Min Read
    How To Install PHP 8.2 on Debian 11
    12 Min Read
    How To Install Nginx on Debian 11: A Comprehensive Guide
    9 Min Read
  • Linux
    LinuxShow More
    Best Practices Linux Server Security for System Administrator
    8 Min Read
    A Simple Guide: How To Manage Groups on Linux
    5 Min Read
    How To Manage Log Files Using Logrotate In Linux
    7 Min Read
    The Easy Ways to Check File Size in Linux
    7 Min Read
    How To Backup Files From Remote Linux VPS Using Rsync Script
    12 Min Read
  • CentOS
    CentOSShow More
    How To Secure SSH with Fail2Ban on CentOS 7
    9 Min Read
    How To Install PHP 8.2 on CentOS 7 / RHEL 7
    18 Min Read
    How To Install Apache Web Server on CentOS 7
    11 Min Read
    How To Set Up a Firewall Using FirewallD on CentOS 7
    5 Min Read
    Initial Setup CentOS 7 Server: Secure and Efficient
    9 Min Read
  • DevOps
    DevOpsShow More
    How To Create AWS CloudFront: A Step-by-Step Guide
    10 Min Read
Reading: The 40 Most-Used Basic Linux Commands You Should Know
Share
Font ResizerAa
Linux for BeginnersLinux for Beginners
  • Ubuntu
  • Rocky Linux
  • Debian
  • Linux
  • CentOS
  • DevOps
Search
  • Ubuntu
  • Rocky Linux
  • Debian
  • Linux
  • CentOS
  • DevOps
Follow US
Copyright © 2014-2023 Ruby Theme Ltd. All Rights Reserved.

The 40 Most-Used Basic Linux Commands You Should Know

Samuel Siahaan
By Samuel Siahaan
Last updated: October 11, 2023
SHARE

Are you new to the world of Linux and feeling a bit overwhelmed by the command line? Don’t worry; we’ve got you covered. In this article, we’ll introduce you to the top basic Linux commands cheat sheet for beginners, helping you become more confident and efficient when using a Linux system. Whether you’re a tech enthusiast or a novice, understanding these commands is essential for navigating the Linux terminal with ease. Linux can be an intimidating system for beginners, but once you get the hang of it, it can be a powerful and efficient platform. To help you get started, we’ve compiled a list of the 40 most-used Linux commands that every beginner should know.

Contents
Table of ContentsGetting Started with the Linux Command LineWhat is Linux?Basic Linux Commands File Operations1. ls – List Files2. cd – Change Directory3. pwd – Print Working DirectoryFile Manipulation4. touch – Create a File5. mkdir – Create a Directory6. rm – Remove Files or DirectoriesData Management7. cp – Copy Files8. mv – Move or Rename FilesFile Viewing and Editing9. cat – Concatenate and Display Files10. nano – Simple Text Editor11. vim – Advanced Text EditorProcess Management12. ps – List Processes13. kill – Terminate ProcessesSearching14. grep – Search TextUser Management15. sudo – Superuser PrivilegesNetwork Commands16. ping – Check Network Connectivity17. ifconfig – Network ConfigurationPackage Management18. apt-get – Package Installation19. yum – Package Management for Red HatFile Compression and Decompression20. tar – Archive and Compress Files21. gzip – Compress FilesMonitoring System Resources22. top – View System StatisticsMiscellaneous Commands23. date – Display the Current Date and Time24. history – View Command History25. clear – Clear the Terminal Screen26. man – Access the Manual Pages27. chmod – Change File Permissions28. chown – Change File Ownership29. df – Display Disk Space Usage30. du – Estimate File and Directory Space UsageAdvanced Commands31. find – Search for Files and Directories32. grep – Search Text in Files33. sed – Stream Editor34. awk – Text Processing Tool35. ssh – Secure Shell Connection36. scp – Securely Copy Files37. wget – Download Files from the Internet38. tar – Archive and Compress Files39. rsync – Synchronize Files and Directories40. curl – Transfer Data with URLsConclusion

Table of Contents

  • Getting Started with the Linux Command Line
    • What is Linux?
    • Basic Linux Commands File Operations
      • 1. ls – List Files
      • 2. cd – Change Directory
      • 3. pwd – Print Working Directory
    • File Manipulation
      • 4. touch – Create a File
      • 5. mkdir – Create a Directory
      • 6. rm – Remove Files or Directories
    • Data Management
      • 7. cp – Copy Files
      • 8. mv – Move or Rename Files
    • File Viewing and Editing
      • 9. cat – Concatenate and Display Files
      • 10. nano – Simple Text Editor
      • 11. vim – Advanced Text Editor
    • Process Management
      • 12. ps – List Processes
      • 13. kill – Terminate Processes
    • Searching
      • 14. grep – Search Text
    • User Management
      • 15. sudo – Superuser Privileges
    • Network Commands
      • 16. ping – Check Network Connectivity
      • 17. ifconfig – Network Configuration
    • Package Management
      • 18. apt-get – Package Installation
      • 19. yum – Package Management for Red Hat
    • File Compression and Decompression
      • 20. tar – Archive and Compress Files
      • 21. gzip – Compress Files
    • Monitoring System Resources
      • 22. top – View System Statistics
    • Miscellaneous Commands
      • 23. date – Display the Current Date and Time
      • 24. history – View Command History
      • 25. clear – Clear the Terminal Screen
      • 26. man – Access the Manual Pages
      • 27. chmod – Change File Permissions
      • 28. chown – Change File Ownership
      • 29. df – Display Disk Space Usage
      • 30. du – Estimate File and Directory Space Usage
    • Advanced Commands
      • 31. find – Search for Files and Directories
      • 32. grep – Search Text in Files
      • 33. sed – Stream Editor
      • 34. awk – Text Processing Tool
      • 35. ssh – Secure Shell Connection
      • 36. scp – Securely Copy Files
      • 37. wget – Download Files from the Internet
      • 38. tar – Archive and Compress Files
      • 39. rsync – Synchronize Files and Directories
      • 40. curl – Transfer Data with URLs
  • Conclusion

Getting Started with the Linux Command Line

What is Linux?

First thing to remember Linux is an open-source operating system that has gained immense popularity for its flexibility and robustness. Another key point one of its distinguishing features is the command-line interface, which allows users to interact with the system directly by typing text-based commands.

To get started, at first you’ll need to open the terminal on your Linux system. Generally you can usually find this by searching for “Terminal” in the application launcher. Especially if you’re new to Linux, the first thing you should know is how to open a terminal. This is your gateway to the world of Linux commands. Simply press Ctrl + Alt + T to open a terminal window.

Once you’ve got your terminal open, it’s time to dive into the essential Linux commands. Don’t worry; we’ll explain them in plain and simple terms straightaway.

- Advertisement -

Now, let’s dive into 40 most-used basic linux commands cheat sheet with following commands:

Basic Linux Commands File Operations

1. ls – List Files

The ls command allows you to list the files and directories in your current location. It’s like opening a folder in a graphical interface.

To use it, simply type ls and press Enter. This command is essential for navigating your file system.

2. cd – Change Directory

The cd command lets you change your working directory. To switch to a different directory, type cd followed by the directory path. For example, cd Documents will take you to your Documents folder.

3. pwd – Print Working Directory

Use pwd to find out where you are in your file system. This command displays the full path of your current directory. It’s like knowing your exact location on a map.

- Advertisement -

File Manipulation

4. touch – Create a File

The touch command creates a new empty file. Just type touch followed by the filename, and it will appear in your current directory.

5. mkdir – Create a Directory

To create a new directory, use the mkdir command. For instance, mkdir Photos will create a directory named “Photos” in your current location.

6. rm – Remove Files or Directories

rm stands for remove. You can delete files and directories using this command. For files, simply type rm followed by the filename. For directories, use rm -r followed by the directory name.

- Advertisement -

Data Management

7. cp – Copy Files

Copying files is a breeze with the cp command. Use cp followed by the source file and destination to create a copy. This is like duplicating a file.

8. mv – Move or Rename Files

The mv command moves files to a different location or renames them. It’s like rearranging your files.

File Viewing and Editing

9. cat – Concatenate and Display Files

cat allows you to view the contents of a file. Just type cat followed by the filename to see what’s inside.

10. nano – Simple Text Editor

nano is a basic text editor for making quick edits to files. Use nano followed by the filename to open it for editing.

11. vim – Advanced Text Editor

If you need a more powerful text editor, vim is your friend. It’s like having Microsoft Word for the terminal. Just type vim followed by the filename to start editing.

Process Management

12. ps – List Processes

ps stands for process status. It shows a list of currently running processes on your system, like viewing open apps on a computer.

13. kill – Terminate Processes

Use kill to stop a running process. Just type kill followed by the process ID, and it will be terminated. It’s like closing an application.

Searching

14. grep – Search Text

The grep command allows you to search for text in files. Use grep followed by the search term and filename to find specific information in your files.

User Management

15. sudo – Superuser Privileges

sudo lets you run commands with superuser privileges. It’s like being the administrator of your system. Use sudo before any command that requires administrative access.

Network Commands

16. ping – Check Network Connectivity

Use ping to check if a website or server is reachable. It’s like sending a message to check if someone’s home.

17. ifconfig – Network Configuration

ifconfig displays information about your network interfaces. It’s like checking your computer’s network settings.

Package Management

18. apt-get – Package Installation

apt-get is a package manager for Debian-based systems like Ubuntu. Use it to install, update, or remove software packages. It’s like a built-in app store.

19. yum – Package Management for Red Hat

If you’re using Red Hat-based systems, yum is your package manager. It does the same thing as apt-get but for Red Hat.

File Compression and Decompression

20. tar – Archive and Compress Files

The tar command allows you to archive and compress files into a single file. Think of it as creating a zip file for your folders.

21. gzip – Compress Files

gzip is used to compress files. It reduces the size of files to save space, just like compressing a folder on your computer.

Monitoring System Resources

22. top – View System Statistics

top displays real-time system statistics, such as CPU and memory usage. It’s like checking your computer’s performance in real-time.

Miscellaneous Commands

23. date – Display the Current Date and Time

The date command shows you the current date and time on your system, similar to your computer’s clock.

24. history – View Command History

history displays a list of previously entered commands. It’s like a record of what you’ve done on your computer.

25. clear – Clear the Terminal Screen

Use clear to clean up your terminal and start with a fresh slate. It’s like erasing a whiteboard.

26. man – Access the Manual Pages

The man command provides detailed documentation for other commands. Think of it as a user manual for Linux.

27. chmod – Change File Permissions

With chmod, you can change the permissions of a file, controlling who can read, write, or execute it. It’s like setting security settings for a file.

28. chown – Change File Ownership

chown allows you to change the owner of a file. It’s like transferring ownership of a document.

29. df – Display Disk Space Usage

df shows you how much disk space is being used on your system. It’s like checking the

space available on your hard drive.

30. du – Estimate File and Directory Space Usage

Use du to estimate the space used by a file or directory. It’s like checking the size of a folder.

Advanced Commands

31. find – Search for Files and Directories

The find command is a powerful tool for searching files and directories based on various criteria. It’s like conducting a thorough search on your computer.

32. grep – Search Text in Files

grep is a versatile command for searching text in files. It’s like using the search function in a word processor.

33. sed – Stream Editor

sed is a text manipulation tool. It’s like finding and replacing text in a document, but for the terminal.

34. awk – Text Processing Tool

awk is a versatile tool for text processing. It’s like using a spreadsheet program, but for the terminal.

35. ssh – Secure Shell Connection

ssh is used to connect to remote servers securely. It’s like accessing a computer in another location.

36. scp – Securely Copy Files

scp allows you to securely copy files between your computer and a remote server. It’s like sending files through a secure email attachment.

37. wget – Download Files from the Internet

Use wget to download files from the internet. It’s like saving a file from a website.

38. tar – Archive and Compress Files

The tar command allows you to archive and compress files into a single file. It’s like creating a zip file for your folders.

39. rsync – Synchronize Files and Directories

rsync is used to synchronize files and directories between different locations. It’s like keeping two folders on your computer in sync.

40. curl – Transfer Data with URLs

curl allows you to transfer data using URLs. It’s like opening a webpage in your terminal.

Conclusion

To summarize learning these 40 most-used essential Linux commands cheat sheet is a great starting point for beginners. With familiar words and simple explanations, you can begin your journey into the Linux world with confidence. Practice these commands, and you’ll soon be navigating and managing your Linux system like a pro. Whether you’re interested in web development, data science, or just exploring a new computing experience, Linux and these fundamental commands are your keys to success.

Also Read Our Other Guides :

  • How To Use Rsync to Sync Local and Remote Directories in Linux
  • How To Get Total Inodes and Increase Disk Inode Number in Linux
  • How To Create and Use Swap File on Linux System
  • How To Use Git Version Control on Linux: For Beginner
  • How To Install and Use Linux Screen with Commands
  • 6 Methods To Search For Files By Name In Linux
  • How To Find Hard Disk Drive Information in Linux

Finally, now you have learned The 40 most-used linux commands cheat sheet. So, embrace the command line, learn these fundamental commands, and unlock the true potential of your Linux system. Happy computing!

TAGGED:LinuxLinux CommandsSearch

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article How To Install PHP 8.2 on CentOS 7 / RHEL 7
Next Article 6 Methods To Search For Files By Name In Linux
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

How To Install and Secure phpMyAdmin on Ubuntu 22.04
Ubuntu
Install and Configure Docker Swarm Mode on Centos 7
CentOS
How To Install and Config Thumbor on Debian 10
Debian
How To Install MariaDB 10.6 on Debian 11 Server
Debian
How To Install MongoDB 6.0 on Debian 10 & 11
Debian

You Might Also Like

Ubuntu

How To Install and Configure Elasticsearch on Ubuntu Server 22.04

14 Min Read
Linux

How To Install and Use Linux Screen with Commands

9 Min Read
Linux

Best Practices Linux Server Security for System Administrator

8 Min Read
Linux

How To Backup Files From Remote Linux VPS Using Rsync Script

12 Min Read
Linux

How To Use Rsync to Sync Local and Remote Directories in Linux

8 Min Read
Debian

Initial Setup Debian 11 Server: Secure and Efficient

17 Min Read
Linux

How To Create and Use Swap File on Linux System

9 Min Read
Linux

6 Methods To Search For Files By Name In Linux

7 Min Read
Show More

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

sammlinux sammlinux

Providing beginner-friendly Linux tutorials and open-source guides to simplify your digital infrastructure.

www.sammlinux.com © 2026 | All Rights Reserved

Join Us!
Subscribe to our newsletter and never miss our latest news, podcasts etc.

Subscribe to our newsletter to get our newest articles instantly!

Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?