• About Us
  • Disclaimers
  • Privacy Policy
  • Sitemap
Linux Tutorials for Beginners
Advertisement
  • Ubuntu
    Install and Secure phpMyAdmin on Ubuntu 22.04

    How To Install and Secure phpMyAdmin on Ubuntu 22.04

    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Ubuntu 22.04

    Install Uptime Kuma on Ubuntu 22.04

    How To Install Uptime Kuma on Ubuntu 22.04

    Install Ubuntu Server 22.04

    How To Install Ubuntu Server 22.04 LTS with Screenshots

    Set Up Firewall on Ubuntu 22.04

    How To Set Up a Firewall with UFW on Ubuntu 22.04

    Install Nginx on Ubuntu

    How To Install Nginx on Ubuntu 22.04: A Comprehensive Guide

    Install MySQL 8.0 on Ubuntu 22.04

    How To Install MySQL 8.0 on Ubuntu Server 22.04

    install-php74-ubuntu2204

    How To Install PHP 7.4 on Ubuntu 22.04

    Install Snipe-IT on Ubuntu 22.04

    How To Install Snipe-IT Asset Management on Ubuntu 22.04

  • Debian
    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Debian 11

    Install Debian 11 Server

    How To Install Debian 11 (Bullseye) Server with Pictures

    Install and Setup Node.js on Debian 11

    How To Install and Setup Node.js on Debian 11

    Install PHP 8.2 on Debian 11

    How To Install PHP 8.2 on Debian 11

    Install Nginx on Debian 11

    How To Install Nginx on Debian 11: A Comprehensive Guide

    Set Up Firewall with UFW on Debian

    How To Set Up a Firewall with UFW on Debian 11

    install php74 on debian 11

    How To Install PHP 7.4 on Debian 11

    Install MariaDB 10.9 on Debian 11

    How To Install MariaDB 10.9 on Debian 11 Server

    Initial Setup Debian Server

    Initial Setup Debian 11 Server: Secure and Efficient

  • Rocky Linux
    Install phpMyAdmin on Rocky Linux 9

    How To Install phpMyAdmin on Rocky Linux 9

    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Rocky Linux 9

    Install Rocky Linux 9.2 Server

    How To Install Rocky Linux 9.2 Server with Screenshots

    setup Firewall Using Firewalld Rocky Linux 9

    How To Set Up a Firewall Using FirewallD on Rocky Linux 9

    Install Nginx on Rocky Linux 9

    How To Install Nginx on Rocky Linux 9: A Comprehensive Guide

    Install Apache on Rocky Linux

    How To Install and Configure Apache on Rocky Linux 9

    Install MongoDB on Rocky Linux 9

    How To Install MongoDB 6.0 on Rocky Linux 9

    Install Docker on Rocky Linux

    How To Install Docker CE on Rocky Linux 9

  • CentOS
    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on CentOS 7

    Install PHP8.2 on CentOS 7

    How To Install PHP 8.2 on CentOS 7 / RHEL 7

    Install Apache on CentOS 7

    How To Install Apache Web Server on CentOS 7

    Set Up FirewallD on CentOS 7

    How To Set Up a Firewall Using FirewallD on CentOS 7

    Initial Setup CentOS 7 Server

    Initial Setup CentOS 7 Server: Secure and Efficient

    Install Nginx on CentOS 7

    How To Install Nginx on CentOS 7: A Comprehensive Guide

    Build NGINX from Source on Centos 7

    How To Build NGINX from Source (Compile) on Centos7

    Install Docker Swarm on CentOS 7

    Install and Configure Docker Swarm Mode on Centos 7

    Install Docker Compose on Centos 7

    How To Install and Use Docker Compose on Centos 7

  • Linux
    Manage Groups on Linux

    A Simple Guide: How To Manage Groups on Linux

    Logrotate In Linux

    How To Manage Log Files Using Logrotate In Linux

    Check File Size in Linux

    The Easy Ways to Check File Size in Linux

    Linux server security system administrators

    Best Practices Linux Server Security for System Administrator

    Backup Files From Remote Linux VPS Using Rsync Script

    How To Backup Files From Remote Linux VPS Using Rsync Script

    SSH Key-based Authentication

    How To Configure SSH Key-based Authentication In Linux

    Linux File Permissions

    Understanding Linux File Permissions for Beginners

    Create Multiboot USB with Ventoy

    How To Create Multiboot USB with Ventoy in Linux

    Find Hard Disk Drive Information in Linux

    How To Find Hard Disk Drive Information in Linux

No Result
View All Result
Linux Tutorials for Beginners
  • Ubuntu
    Install and Secure phpMyAdmin on Ubuntu 22.04

    How To Install and Secure phpMyAdmin on Ubuntu 22.04

    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Ubuntu 22.04

    Install Uptime Kuma on Ubuntu 22.04

    How To Install Uptime Kuma on Ubuntu 22.04

    Install Ubuntu Server 22.04

    How To Install Ubuntu Server 22.04 LTS with Screenshots

    Set Up Firewall on Ubuntu 22.04

    How To Set Up a Firewall with UFW on Ubuntu 22.04

    Install Nginx on Ubuntu

    How To Install Nginx on Ubuntu 22.04: A Comprehensive Guide

    Install MySQL 8.0 on Ubuntu 22.04

    How To Install MySQL 8.0 on Ubuntu Server 22.04

    install-php74-ubuntu2204

    How To Install PHP 7.4 on Ubuntu 22.04

    Install Snipe-IT on Ubuntu 22.04

    How To Install Snipe-IT Asset Management on Ubuntu 22.04

  • Debian
    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Debian 11

    Install Debian 11 Server

    How To Install Debian 11 (Bullseye) Server with Pictures

    Install and Setup Node.js on Debian 11

    How To Install and Setup Node.js on Debian 11

    Install PHP 8.2 on Debian 11

    How To Install PHP 8.2 on Debian 11

    Install Nginx on Debian 11

    How To Install Nginx on Debian 11: A Comprehensive Guide

    Set Up Firewall with UFW on Debian

    How To Set Up a Firewall with UFW on Debian 11

    install php74 on debian 11

    How To Install PHP 7.4 on Debian 11

    Install MariaDB 10.9 on Debian 11

    How To Install MariaDB 10.9 on Debian 11 Server

    Initial Setup Debian Server

    Initial Setup Debian 11 Server: Secure and Efficient

  • Rocky Linux
    Install phpMyAdmin on Rocky Linux 9

    How To Install phpMyAdmin on Rocky Linux 9

    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on Rocky Linux 9

    Install Rocky Linux 9.2 Server

    How To Install Rocky Linux 9.2 Server with Screenshots

    setup Firewall Using Firewalld Rocky Linux 9

    How To Set Up a Firewall Using FirewallD on Rocky Linux 9

    Install Nginx on Rocky Linux 9

    How To Install Nginx on Rocky Linux 9: A Comprehensive Guide

    Install Apache on Rocky Linux

    How To Install and Configure Apache on Rocky Linux 9

    Install MongoDB on Rocky Linux 9

    How To Install MongoDB 6.0 on Rocky Linux 9

    Install Docker on Rocky Linux

    How To Install Docker CE on Rocky Linux 9

  • CentOS
    Secure SSH with Fail2Ban

    How To Secure SSH with Fail2Ban on CentOS 7

    Install PHP8.2 on CentOS 7

    How To Install PHP 8.2 on CentOS 7 / RHEL 7

    Install Apache on CentOS 7

    How To Install Apache Web Server on CentOS 7

    Set Up FirewallD on CentOS 7

    How To Set Up a Firewall Using FirewallD on CentOS 7

    Initial Setup CentOS 7 Server

    Initial Setup CentOS 7 Server: Secure and Efficient

    Install Nginx on CentOS 7

    How To Install Nginx on CentOS 7: A Comprehensive Guide

    Build NGINX from Source on Centos 7

    How To Build NGINX from Source (Compile) on Centos7

    Install Docker Swarm on CentOS 7

    Install and Configure Docker Swarm Mode on Centos 7

    Install Docker Compose on Centos 7

    How To Install and Use Docker Compose on Centos 7

  • Linux
    Manage Groups on Linux

    A Simple Guide: How To Manage Groups on Linux

    Logrotate In Linux

    How To Manage Log Files Using Logrotate In Linux

    Check File Size in Linux

    The Easy Ways to Check File Size in Linux

    Linux server security system administrators

    Best Practices Linux Server Security for System Administrator

    Backup Files From Remote Linux VPS Using Rsync Script

    How To Backup Files From Remote Linux VPS Using Rsync Script

    SSH Key-based Authentication

    How To Configure SSH Key-based Authentication In Linux

    Linux File Permissions

    Understanding Linux File Permissions for Beginners

    Create Multiboot USB with Ventoy

    How To Create Multiboot USB with Ventoy in Linux

    Find Hard Disk Drive Information in Linux

    How To Find Hard Disk Drive Information in Linux

No Result
View All Result
Linux Tutorials for Beginners
No Result
View All Result

Home » Linux » The 40 Most-Used Basic Linux Commands You Should Know

The 40 Most-Used Basic Linux Commands You Should Know

sammbysamm
October 19, 2023
Basic Linux Commands for Beginners

The 40 Most-Used Basic Linux Commands You Should Know for Beginners

Share on FacebookShare on LinkedinShare on Whatsapp

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.

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.

OTHER POSTS

A Simple Guide: How To Manage Groups on Linux

How To Manage Log Files Using Logrotate In Linux

The Easy Ways to Check File Size in Linux

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.

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.

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.

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!

Tags: LinuxLinux CommandsSearch

If you got help by our tutorials, please buy me a coffee..!

Buy Me a Coffee

Thank you so much for your support!!

Previous Post

How To Install PHP 8.2 on CentOS 7 / RHEL 7

Next Post

6 Methods To Search For Files By Name In Linux

Leave a Reply Cancel reply

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

RECENT POST

Install and Secure phpMyAdmin on Ubuntu 22.04

How To Install and Secure phpMyAdmin on Ubuntu 22.04

by samm
July 22, 2024
0

Are you ready to take control of your MySQL databases on Ubuntu 22.04? In this step-by-step guide, we'll walk you...

Manage Groups on Linux

A Simple Guide: How To Manage Groups on Linux

by samm
November 12, 2023
0

Are you a Linux enthusiast looking to enhance your system administration skills? One fundamental aspect you should master is how...

Install phpMyAdmin on Rocky Linux 9

How To Install phpMyAdmin on Rocky Linux 9

by samm
November 11, 2023
0

If you're navigating the world of Rocky Linux 9 and looking to streamline your MariaDB or MySQL database management, installing...

Logrotate In Linux

How To Manage Log Files Using Logrotate In Linux

by samm
November 10, 2023
0

Log files are an essential part of any Linux system. They provide valuable insights into the system's activities, helping administrators...

Load More

RECOMMENDED.

Install Redis on Debian

How To Install Redis on Debian 11 Server

October 16, 2023
Secure SSH with Fail2Ban

How To Secure SSH with Fail2Ban on Rocky Linux 9

October 29, 2023
sammlinux sammlinux sammlinux

Related Posts

Manage Groups on Linux
Linux

A Simple Guide: How To Manage Groups on Linux

November 12, 2023
Logrotate In Linux
Linux

How To Manage Log Files Using Logrotate In Linux

November 10, 2023
Check File Size in Linux
Linux

The Easy Ways to Check File Size in Linux

November 10, 2023
Linux server security system administrators
Linux

Best Practices Linux Server Security for System Administrator

November 10, 2023
Load More
Next Post
Search for Files in Linux

6 Methods To Search For Files By Name In Linux

  • About Us
  • Disclaimers
  • Privacy Policy
  • Sitemap

© 2023 sammlinux - Learn Today for Lead Tomorrow.

No Result
View All Result
  • Ubuntu
  • Debian
  • Rocky Linux
  • CentOS
  • Linux

© 2023 sammlinux - Learn Today for Lead Tomorrow.