在Debian中将固定IP地址更改为另一个IP地址
前提是已经将IP地址固定在一起。
请注意,在下面的链接“VirtualBox中安装Debian”中假设IP地址已更改为固定状态。
#!/bin/bash
#
# ip.sh 192.168.1.11
#
IP=$1
# 変更後、SSHは切断されます。
sed -i -e "s/\(address\s\)[0-9\.]\+/\1${IP}/" /etc/network/interfaces.d/local \
&& systemctl restart networking