在Ubuntu上设置动态IP的步骤如下:
sudo nano /etc/network/interfaces
iface eth0 inet dhcp
iface wlan0 inet dhcp
sudo systemctl restart networking.service
sudo service networking restart
设置完成后,Ubuntu将通过DHCP自动获取IP地址。