Generally we can add a new IP to the eth0 network card
cd /etc/sysconfig/network-scripts/ cp ifcfg-eth0 ifcfg-eth0:1 vim ifcfg-eth0:1 DEVICE=eth0:1 # 修改网卡名称 HWADDR=29:61:16:5B:29:7C TYPE=Ethernet UUID=bf14538c-a6cf-4fd3-b459-e4db69437c2e ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.1.203 NETMASK=255.255.255.192 GATEWAY=xxx.xxx.xx.xxx DNS1=8.8.8.8
Save and exit and then start the network card:
ifup eth0:1
Then you can use the ip addr command to check whether the addition is successful
Bonus: Delete the specified ip on the network card
ip addr del 192.168.0.1 dev eth0 # 删除网卡的第二个IP地址
The above is the detailed content of How to add IP address in CentOS. For more information, please follow other related articles on the PHP Chinese website!

Artificial Intelligence (AI) is a term that’s been buzzing around for a while now, from self-driving cars to voice assistants like Siri and Alexa, AI is becoming a part of our everyday lives. But what exactly is AI, and why should Linux users care ab


For someone new to Linux, using it can still feel challenging, even with user-friendly distributions like Ubuntu and Mint. While these distributions simplify many tasks, some manual configuration is often required, but fully harnessing the power of L

In the previous article, we introduced the basics of AI and how it fits into the world of Linux. Now, it’s time to dive deeper and set up your Linux system to start building your first AI model. Whether you’re a complete beginner or have some exper

If you’re looking to manage your server with ease, Kloxo is a great option, as it is free and open-source web hosting control panel that allows you to manage your server and websites with a simple, user-friendly interface. In this guide, we’ll walk

If you’ve ever found yourself in a situation where you’re trying to move a bunch of files and folders, only to be stumped by spaces in the folder names, you’re not alone. Spaces in filenames or folder names can quickly become a frustrat

The KDE Plasma desktop is renowned for its sleek design, extensive customization options, and impressive performance. For users who appreciate a polished, modern interface with the flexibility to tweak every detail, Plasma is a dream come true. But w


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download
The most popular open source editor
