Basic Centos commands with explanation

  1. Basic Centos commands with explanation

Basic Centos commands with explanation

CentOS commands – CentOS is a popular Linux distribution that is based on the open-source code of Red Hat Enterprise Linux (RHEL).

CentOS commands – The way we have different software for various purposes, the same way, their exist different operating systems for different purposes. An organization has several technical requirements that need different platforms in order to be fulfilled.

The normal users who depend upon the easy graphical user interface for their work usually prefer Windows while the professional who needs to get into the core of the system and need a command-line interface prefers to go with Unix or Linux based on their exact requirement.

There are several operating systems available in the market which serves the users as per their need. Here in this article, we will be learning about one of the most important Linux based operating systems that works using the same command as used in the Linux operating system.

What is CentOs?

CentOS may be defined as the Linux based operating system that leverages the commands used in Linux in order to serve the users. It has a very simple interface that lets the user perform their task with the ease and comfort of enjoying the interactive interface. There are various plus points of using the centOS over other operating systems, and one of the most important positive points is its lightweight. The hardware required to run CentOS is not that high, and it can be run over any machine that has 2GB of RAM and 200GB of the hard disk.

It severs the purpose of normal usage very well, and if the user wants to perform any heavy task, they are suggested to move to Linux OS. The CentOS can also be explained as an operating system belonging to the Linux family that offers the user’s interactive GUI-based interface.

When compared with Windows, the function available in CentOS is a bit less comparatively. But in comparison to any other distribution of Linux, the amazing GUI of CentOS gives it an edge. It doesn’t require any specialization to work with CentOS as you will be able to work with it if you have an idea about the basic commands of Linux. In the next section, we will learn about some of the essential commands used to work with CentOS.

Here are some basic CentOS commands along with explanations:

ls – List Files and Directories:

Syntax: ls [options] [directory]

Explanation: Lists the files and directories in the specified directory. Common options include -l (long format), -a (show hidden files), and -h (human-readable sizes).

cd – Change Directory:

Syntax: cd [directory]

Explanation: Changes the current working directory to the specified directory.

pwd – Print Working Directory:

Syntax: pwd

Explanation: Displays the current working directory.

cp – Copy Files or Directories:

Syntax: cp [options] source destination

Explanation: Copies files or directories from the source to the destination.

mv – Move or Rename Files or Directories:

Syntax: mv [options] source destination

Explanation: Moves files or directories from the source to the destination. Can also be used for renaming.

rm – Remove Files or Directories:

Syntax: rm [options] file(s) or directory

Explanation: Removes (deletes) files or directories. Be cautious, as this action is irreversible.

mkdir – Make Directory:

Syntax: mkdir [options] directory

Explanation: Creates a new directory with the specified name.

rmdir – Remove Empty Directories:

Syntax: rmdir [options] directory

Explanation: Removes empty directories. If the directory is not empty, you can use rm -r to remove it.

chmod – Change File Permissions:

Syntax: chmod [options] mode file(s)

Explanation: Changes the permissions of a file or directory.

chown – Change File Owner:

Syntax: chown [options] user:group file(s)

CentOS commands
CentOS commands

Explanation: Changes the owner of a file or directory.

These are some fundamental CentOS commands that can help you navigate the file system, manage files and directories, and perform basic system tasks.

Scroll to Top