The command ifconfig stands for Interface CONFIGuration. It is used
to configure, control, and query network interface parameters of your system.
If you try running this command with no arguments, it will simply display information
about all network interfaces currently active.
ifconfig
The output sill resembles something like this, of course it changes from machine
to machine:
If you want to view the configuration of all network interfaces, not just the ones
currently active, you can use flag a.
ifconfig -a
If you want to view the configuration of a specific interface, you can specify
the name of the interface you want to view after the command ifconfig:
ifconfig ap1
This command will show only the configuration of ap1.
To enable an interface, you can use the command ifconfig with the name of the interface
you want to enable, followed by the key word up.
However, enabling or disabling a device, is a privilege reserved for the super user,
therefore you also have to use the command sudo.
sudo ifconfig ap1 up
To disable an interface, you can follow the same procedure, this time using
the key word down.