> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://helpdesk.ggcircuit.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 将 ggrock 服务器恢复为 DHCP 以便获取新的 IP 地址

在继续之前，请先复制这些命令

ip a

cat /etc/network/interfaces

cat /etc/resolv.conf

完成后，我们需要备份接口文件

cp /etc/network/interfaces /etc/network/interfaces.SP.bak

运行此命令，使服务器在下次启动时获取DHCP地址

cp /etc/network/interfaces.bak/interfaces.bak /etc/network/interfaces

***注意：***  
要撤销更改，只需运行下面的命令，它将恢复我们所做的备份

cp /etc/network/interfaces.SP.bak /etc/network/interfaces

***额外注意***

我们没有重启网络服务，这就是为什么这些更改是"暂存"的 - 如果我们重启了网络服务，它现在会获取一个新地址，这是不希望的。