请前往 模块插件 激活 UI Manage 然后刷新

Entrar
Base de Conhecimento

Ubuntu批量添加IP

ubuntu 18.04 17.04

#写入到 /etc/netplan/01-netcfg.yaml
echo "      addresses: " >> /etc/netplan/01-netcfg.yaml
for ((i=1;i<=64;i++))
do
echo "        - 1.2.3.$i/29" >> /etc/netplan/01-netcfg.yaml
done
echo "      gateway4: 1.2.3.4" >> /etc/netplan/01-netcfg.yaml

#应用
netplan apply



ubuntu 16.04 14.04 脚本

# !/bin/bash
for ((i=1;i<=64;i=i+1))
do
echo "auto eth0:$i">>/etc/network/interfaces
echo "iface eth0:$i inet static">>/etc/network/interfaces
let j=$i+5
echo "address 1.2.3.$j">>/etc/network/interfaces
echo "netmask 255.255.255.248">>/etc/network/interfaces
echo "gateway 1.2.3.4">>/etc/network/interfaces
echo " ">>/etc/network/interfaces
done
# end
  • 310 Utilizadores acharam útil
Esta resposta foi útil?

Related Articles

Ubuntu 18 修改ip

vim /etc/netplan/*.yaml   备注:ip和dns前面要空一格 wq保存 netplan apply  重启网卡注意:格式如果错误会导致无法重启网卡

Ubuntu 20.04 修改 IP / 加內網IP

vi /etc/network/interfaces :wq保存 重启网卡: /etc/init.d/networking restart

Ubuntu 安装ssh

一、安装ssh 18.04   apt install openssh-server   16.04   apt-get install openssh-server...

ubuntu18 時區

Ubuntu 要改变 Timezone 时区设定,可以用以下方法: dpkg-reconfigure 用 root 身份用 dpkg-reconfigure 设定 Ubuntu 的...

解决Ubuntu "E: 软件包 vim 还没有可供安装的候选者"问题

sudo apt-get update&&sudoo apt-get upgrade或者sudo apt-get update

<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script> <script>LA.init({id:"JtJTr4Zl4JkxXHuP",ck:"JtJTr4Zl4JkxXHuP"})</script>