Before starting, You have to learn few things about Linux.
- 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.
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.
All the commands are case-sensitive in Linux so please take care of it always.
Let’s start now.
- 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.
- 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.
- 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
- 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.
- 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.
Top comments (0)