If you don't want to use a GUI, you've got a handful of options. First off, there's nmcli con edit [network-profile]
, and then there's nmcli con mod [network-profile]
, and finally you can edit raw text files directly (assuming you're running as root). By [network-profile]
, I mean the name of the network profile you want to configure.
The first wants to be used interactivity, but you can pass any/all options to stdin. In other words, you'll need to do something like `echo options | nmcli con edit [network-profile]".
The second lets you specify parameters via the command-line, but anything you don't specify may or may not be blanked out, removing pre-existing settings you didn't necessarily want. For instance, if you modify a VPN connection and change one thing in vpn.data
, you have to change everything, or lose a bunch of settings.
The third means editing files in /etc/NetworkManager/system-connections/
, and then reloading those file - either by restarting NetworkManager (thus temporarily loosing network connectivity), or by running nmcli con reload
(as root).
Either way, you're going to have to mess things up a bit in order to learn. (I'm still learning.) If you do, it doesn't need to be the end of the world, but you're advised to keep backups in case things go south.
As for ignoring hosts, there's a file, /etc/hosts.deny
, which is a text file that, as far as I know, doesn't come with any tools to automate the changes, you you'll need to code your way around that issue on your own. By default, the file comes with nothing but comments, which are meant to help users see how to use this file.