Article title: Netenv: Select your network environment at startup. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Netenv is suitable for situations where the network environment changes frequently. for example, if you switch between the home and the company with a notebook, the network environment is still different. The idea of this tool is very simple. at startup, a dialog box is displayed, asking you to select an environment, and then set the network according to specific parameters.
In Debian/Ubuntu, the/etc/network/inetfaces file is simply signed and linked to different configuration files (different configuration files in different environments ).
Because different environments can be selected, different scripts can be executed, so that you can make a time decision in the script, such as configuring the network to the company's network environment during working hours, during non-working hours, configure the environment at home. Of course, this method is not suitable for those who often work overtime: D
Netenv