Hello Everyone, Today we will talk about all the basic commands for CentOS 9 for all kinds of users. that is also top 10 commands for CentOS 9.
Before starting, You have to learn few things about Linux.
1. Whenever you will open the terminal it will be the normal user who would be logged in the system and with that user most of the cases you won’t be able to run any command and will get error called Error: This command has to be run with superuser privileges (under the root user on most systems).

You have to switch to root for running all the commands easily by su – and put the root password.

2. With root user you have to be more responsible as you will have all the powers. Root user is the administrator of the Linux system. For the ease of working we will be using root user for this post.
3. All the commands are case-sensitive in Linux so please take care of it always.
Let’s start now.
1. dnf/yum
dnf stands for dandified yum and it is the advance version of yum. It helps in installation of any software in Centos 9. It is faster than yum. yum stands for yellowdog updater modified.

Format of the dnf command is dnf install (software name) or simply dnf update to update the system.
Examples: dnf install vim, dnf install httpd, dnf install net-tools etc.
It will always ask in middle of the command to is this ok to install [y/N] and we have to answer with y to continue installing the software.

2. mkdir
mkdir stands for make directory and in linux directory is the folders in which we use to keep files.
Format of the mkdir command is mkdir (directory name)
Examples: mkdir music, mkdir documents, mkdir videos etc.

3. ls
ls stands for list and it is used for showing the content of the directory in linux
Format of the ls command is ls
Example: ls

4. cd
cd stands for change directory and it is used for changing the current directory.
Format of the cd command is cd (path name)
Examples: cd /etc, cd /var, cd /home etc.

5. vi/vim
vi stands for visual interface and it is used for creating or editing the text file. vim is improved version of vi with graphical colour patterns. For writing in the vim file we have to press ‘I’ then write. After that we have to press ‘Esc’ key to come out of writing mode and type ‘:wq’ to save and quit vim.
Format of the vim command is vim (file name)
Examples: vim doc, vim file, vim taxes etc.

6. pwd
pwd stands for print working directory and it is used for printing the working directory wherein the user is.
Format of the pwd command is pwd
Example: pwd

7. touch
touch command is used to create a empty file in Linux.
Format of the touch command is touch (filename)
Examples: touch notes, touch doc, touch taxes etc.

8. man
man stands for manual and it helps in knowing the manual of any command. It helps the user to know the command options and arguments. We have to press ‘q’ to come out of the man command.
Format of the man command is man (command name)
Examples: man useradd, man usermod, man pwd etc.

9. useradd
useradd command is used for creating the new user in the Linux system.
Format of the useradd command is useradd (user name)
Examples: useradd vishal, useradd varun, useradd sahil etc.

10. cat
cat stands for concatenate and it is mostly used for displaying the content of a file. cat command can be used for 3-4 ways but we will only talk about the mostly used way.
Format of the cat command is cat (file name)
Examples: cat doc, cat file, cat notes etc.

We have done with the basic commands to run a Centos system. It is just the basic commands and their simple usage. We will talk about it deeply really soon in coming blogs. Till then Happy Learning with Root Learning.
If you want to Learn How to install CentOS 9 server. Please go through the given link. You can also follow us on Instagram for future updates.
FAQ on basic commands for CentOS 9
How do I check the CentOS version?
Use the command:
cat /etc/centos-release
How do I update the system?
To update all packages to their latest version, use:
sudo dnf update
How do I install a package?
Use:
sudo dnf install package-name
How do I remove a package?
Use:
sudo dnf remove package-name
How do I search for a package?
Use:
dnf search package-name
How do I get information about a specific package?
Use:
dnf info package-name
Discover more from Root Learning
Subscribe to get the latest posts sent to your email.
I have never seen this quality of explaining…Do more. I will be following you ☺️☺️