Sunday, February 5, 2023
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory
  • Login
  • Register
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
No Result
View All Result

Home > Article > 50 basic Linux commands you should know

50 basic Linux commands you should know

In this article we are covering the most essential Linux commands that every user should know. We've picked the list from the most frequently used ones.


Ugur Kubilay Cam Ugur Kubilay Cam
November 10, 2021
6 min read
Top Linux Commands

Due to the nature of Linux-based operating systems, many operations are performed through the terminal. In this process, we wanted to share with you the basic commands that will make your work easier.

Here are the top Linux commands we have prepared for you:

Command Description Usage
cd The cd command is used to navigate through folders. $ cd path_the_folder
$ cd .. (Go to the parent folder)
ls The ls command is used to list files in a folder. $ list (list only file_names)
$ ls -la (detailed file information)
mkdir The mkdir command is used to create a folder. $ mkdir folderName
rmdir The rmdir command is used to remove a folder. $ rmdir folderName
touch The touch command is used to create an empty file. $ touch fileName.txt
cp The cp command is used to copy a file or folder. $ cp [source_file_or_folder] [target_file_or_folder]
mv The mv command is used to move or rename a file. $ mv [source_file] [target_file_with_new_name]
rm The rm command is used to remove a file. $ rm fileName
cat The cat command is used to print the contents of a file to the terminal. $ cat fileName
head The head command is used to print the contents of a file with the number of lines from beginning to end to the terminal. $ head (10 lines)
$ head -n number_of_lines
tail The tail command is used to output the contents of a file from the back to the top with the number of lines. $ tail (10 lines)
$ tail -n number_of_lines
less The less command is used to display the output of a command and a file page by page. $ less fileName or command
whoami The whoami command is used to display who the active user is. $ whoami
id The id command is used to display the information of the user or group. $ id
uname The uname command is used to display the kernel and processor information of the system used. $ uname -a (for all information)
su The su command is used to switch to the root user or another user. It is short for “super user”, “switch user” or “substitute user”. The password of the user to be switched must be entered. $ su username
sudo The sudo command is used to run a command with root privileges. When the command ends, it returns to normal user privileges. $ sudo [command]
passwd The passwd command is usually used to change the user password, but can also be used to lock the user and override her password. $ passwd (loged user)
$ passwd username (another user)
useradd The useradd command is used to create a new user. $ useradd username
userdel The userdel command is used to delete a user. $ userdel username
hostname The hostname command is used to display hostname. $ hostname
grep The grep command is used to search for a word in files and to output the files that have that word. $ grep -rl “search_word”
find The find command is used to search filenames and list matching files. $ find / -name “fileName”
which The which command is used to search the directories specified by the $PATH variable in the environment variables of a command and find the executable file. $ which [command]
locate The locate command is used to search by filename in “locate” like “find”. $ locate word
history The history command is used to output the previously written commands. $ history
pwd The pwd command is used to output the current file path. $ pwd
who The who command is used to display the users who are currently online in the system. $ who
chmod The chmod command is used to change the authorization required for users to access and run files. It is short for “change mode”. $ chmod +x fileName (To give run permission to all users)
apt The apt command is used to install, uninstall and update the system and applications. It is short for “Advanced Package Tool”.  RedHat-based systems use yum. $ sudo apt install appName (to install the app)
$ sudo apt remove appName (to remove the app)
$ sudo apt upgrade appName (to upgrade the app)
$ sudo apt update (update the package database)
$ sudo apt upgrade (upgrade the system and apps)
man The man command is used to call up detailed documentation about a command. $ man [command]
chown The chown command is used to change the ownership of a file or folder. $ chown [username] [fileName or folderName]
top The top command is used to get detailed information about the processes running in the system. $ top
ps The ps command is used to list running processes. $ ps -aux
wget The wget command is used to download files over http, https and ftp protocols. $ wget [url]
tree The tree command is used to see the skeleton structure of other files and folders in a folder. $ tree folderName
df The df command is used to see the disk space usage information of the file system. $ df /home/user
wc The wc command is used to output the number of lines, the number of words, and the number of characters in a file. $ wc fileName
clear The clear command is used to clear the command line. $ clear
reboot The use of reboot is not recommended, instead “shutdown -r” provides a safer reboot. (for old systems) $ reboot or shutdown -r
shutdown The shutdown command is used to shut down the system. When the “shutdown” command is used alone, it shuts down the system after 1 minute. If you want to shut down the system immediately, you can use the “shutdown now” command. $ shutdown now
tar The tar command is one of the most used commands for file and folder compression. $ tar -cvf Archive.tar /home/Archive
$ tar -cvzf Archive.tar.gz /home/Archive (for better compression than tar)
kill The kill command is used to kill a process. For different alternatives: How to kill a process in Linux $ kill [processID] or kill -9 [processID]
ping The ping command is used to verify whether another device on the IP network is reachable. It is short for “Packet Internet Groper”. $ ping [IP]
zip The zip command is used for file and folder compression. $ zip -r archive.zip fileName
$ zip -r archive.zip folderName/
unzip The unzip command is used to uncompress the compressed files. $ unzip archive.zip
mount The mount command is used with the address and mount point of the new device to be mounted in an existing directory. $ mount -t type device directory
traceroute The traceroute command is used to detect the path traveled until reaching a server. $ traceroute [domain or IP]
date The date command is used for setting the date and the time. When you type the command alone, it outputs the current date and time. $ date
$ date -s “2 NOV 2021 17:45:12” (for change the system time)
open The open command is used to open files and folders with the user interface. $ open fileName
$ open folderName

Top 50 Linux Commands PDF download

Click here to download the Top 50 Linux Commands as pdf file.

Ugur Kubilay Cam

Ugur Kubilay Cam

Ugur Kubilay Cam is the content marketing specialist of Cloud7 News. In addition to being an SEO expert, Ugur Kubilay is a Python developer and cybersecurity researcher. Ugur has a Bachelor's degree and a master's degree in Data Analysis. With more than 15 years of experience, Ugur Kubilay Cam is an active Linux user and administrator.

Leave a Reply Cancel reply

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

I agree to the Terms & Conditions and Privacy Policy.

Next Post
OCP launches the first OCP Experience Center in Southeast Asia

OCP launches the first OCP Experience Center in Southeast Asia

Related News

Weekly round-up 30 January – 3 February

Weekly round-up: 30 January – 3 February

February 4, 2023 9:00 pm
What is Deep Learning?

What is Deep Learning?

February 4, 2023 6:00 pm
What is GitHub Copilot

What is GitHub Copilot?

February 4, 2023 4:00 pm
Best Ubuntu alternatives for desktop of 2023

Best Ubuntu alternatives for desktop of 2023

February 4, 2023 12:20 pm
Get free daily newsletters from Cloud7 News Get the Cloud7 Newsletter
Select list(s):

Check your inbox or spam folder to confirm your subscription.

By subscribing, you agree to our
Copyright Policy and Privacy Policy

Get the free newsletter

Subscribe to receive the latest IT business updates straight to your inbox.

Select list(s):

Check your inbox or spam folder to confirm your subscription.

Editor's Choice

What’s new in Linux kernel 6.2 rc6?

10 Best Web Hosting Services of 2023

Ubuntu 22.04 LTS is available for download. What is new?

CERN and Fermilab recommend AlmaLinux

7 best hosting control panels of 2023

How to update Linux Kernel without rebooting?

7 best Linux mail servers of 2023

7 best cPanel alternatives for 2023

7 best Linux web browsers for 2023

7 best CentOS alternatives

7 best Linux server distros of 2023

Interview with Igor Seletskiy on AlmaLinux

How to create a VM on VMware Workstation

Recent News

  • Weekly round-up: 30 January – 3 February
  • What is Deep Learning?
  • What is GitHub Copilot?
  • Cloud7 Expert Series: Dennis Kittrell from CloudLinux
  • Best Ubuntu alternatives for desktop of 2023

Cloud7 News
Cloud7 is a news source that publishes the latest news, reviews, comparisons, opinions, and exclusive interviews to help tech users of high-experience levels in the IT industry.

EXPLORE

  • Web Hosting
  • Cloud Computing
  • Data Center
  • Cybersecurity
  • Linux
  • Network/Internet
  • Software
  • Hardware
  • How-Tos
  • Troubleshooting

RESOURCES

  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

Get the Cloud7 Newsletter

Get FREE daily newsletters from Cloud7 delivering the latest news and reviews.

  • About
  • Privacy & Policy
  • Copyright Policy
  • Contact

© 2023, Cloud7 News. All rights reserved.

No Result
View All Result
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

© 2023, Cloud7 News. All rights reserved.

Welcome Back!

Sign In with Facebook
Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Facebook
Sign Up with Google
Sign Up with Linked In
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.