Basic system configuration tasks in CentOS typically involve setting up hostname, configuring network settings, managing users, and performing basic system maintenance. Here's how you can perform these tasks:
1. Setting Hostname:
- Open a terminal or connect to your CentOS system via SSH.
- Use the
hostnamectlcommand to set the hostname:sudo hostnamectl set-hostname yourhostname
- Replace
yourhostnamewith the desired hostname for your system. - Optionally, you can edit the
/etc/hostnamefile directly and add your hostname there.
2. Configuring Network Settings:
- Network settings in CentOS are typically configured using the
nmcliornmtuicommands. - Use
nmclito manage network connections from the command line:sudo nmcli connection modify <connection-name> ipv4.addresses <IP-address>
sudo nmcli connection modify <connection-name> ipv4.gateway <gateway-IP>
sudo nmcli connection modify <connection-name> ipv4.dns <DNS-server-IP>
sudo nmcli connection up <connection-name> - Replace
<connection-name>with the name of your network connection (e.g.,eth0,ens33). - Replace
<IP-address>,<gateway-IP>, and<DNS-server-IP>with your desired IP address, gateway, and DNS server IP addresses, respectively.
3. Managing Users:
- Use the
useraddcommand to add a new user:sudo useradd -m username
- Replace
usernamewith the desired username. - Set a password for the new user using the
passwdcommand:sudo passwd username
- Provide a password when prompted.
- Optionally, you can add the new user to specific groups using the
usermodcommand.
4. Basic System Maintenance:
- Update package repositories and install available updates:
sudo yum update
- Install additional software packages as needed using the
yum installcommand. - Monitor system resources using tools like
top,htop, orsar. - Manage system services using commands like
systemctl start,systemctl stop, andsystemctl enable.

Comments