Centos Interview Questions and Answers
- 1) What is CentOS?
- 2) What is the CentOS variant?
- 3) What is the current stable release of CentOS?
- 4) What is the nmcli Tool in CentOS?
- 5) List some package managers you have used in CentOS?
- 6) How to Restart Network Service on CentOS 8?
- 7) How To Create a Sudo User on CentOS?
- 8) List some basic centos commands?
- 9) How to delete a user in centos?
- 10) How to enable/disable a service on centos?
Below are the list of Best Centos Interview Questions and Answers
CentOS is one of the Linux distribution that is affiliated with the Red Hat. It is an open-source operating system that was first launched in 2004. This free operating system officially supports x86-64 architecture which mainly targets the servers, desktop computers, and workstations. It is a community-driven free software that is consistent and easy to use.
The CentOS variant is a special edition of CentOS. With this variant, you can allow another open-source project to run more effectively using CentOS as the base platform. The CentOS variant starts with the core distribution and replaces the specific subsets of packages.
The current stable release of the CentOS is version 8.1.1911 that was released in January 2020.
The nmcli is a command-line tool in CentOS for controlling the Network manager. This tool is used to display network device status, create, edit, activate, deactivate, and delete network connections.
The Yellow Dog Updater (YUM) is the default package manager in CentOS. It is used to install and update packages in the CentOS.
The other package manager in CentOS is RPM, DNF, pip, dpkg, and aptitude.
You can use the network manager service to restart a service in the CentOS. The command used to restart a service in the CentOS is "$sudo systemctl restart NetworkManager.service". You can also use the nmcli tools to restart network service. Use the following commands in the nmcli tool to restart a network service,
$sudo nmcli networking off $sudo nmcli networking on
To create a Sudo user on the CentOS, follow these steps on your command-line shell.
- Log in to your server $ssh root@server_ip_address
- Create a new user account $useradd username
- Set the user password $passwd username
- Add the new user to the sudo group $usermod -aG wheel username
- To switch to the newly created user $su - username
Some of the basic CentOS commands are,
- Sudo - runs a command as superuser
- Yum - lets you install and update packages
- Ls - lists the contents of the directory
- Cd - used to change directory
- Pwd - displays the pathname
- Mv - used to move files
- Cp - used to copy files
- Mkdir - used to create a directory
- Who - used to check who is logged on
- Clear - used to clear the terminal window
- Nano - opens a text editor
You can remove a user in centos by using the userdel command
//syntax # userdel -r user The above command removes the user names “user”.
We can use the following command to enable or disable service on centos
To enable a service, use the following command,
Systemctl enable <service_name>
To disable a service, use the following command,
Systemctl disable <service_name>
Latest Interview Questions
Meteor.js Interview Questions
Dynamodb Interview Questions
FTTH Interview Questions
Amazon DevOps Engineer Interview Questions
Sap lumira Interview Questions
Sap Abap Interview Questions
Amazon Cloud Engineer Interview Questions
Sap Netweaver Interview Questions
Amazon Support Engineer Interview Questions
Robotics interview questions
Amazon Interview Questions
AI Interview Questions
Aws interview questions
Cloud Computing Interview Questions
Apache Ant Interview questions
EJB Interview Questions
Web Designing Interview Questions
Vue.js Interview Questions
Visualforce Interview Questions
Typescript Interview Questions
Teradata Interview Questions
Teacher Interview Questions
Tally interview questions
Tableau interview questions
SVG Interview Questions
SQLite interview questions
Spring interview questions
Soap interview questions
SMO Interview Questions
Seo Interview questions
Subscribe Our NewsLetter
Never Miss an Articles from us.