Hyper Expert /Blog

HOW-TO: Enable networking on minimal Linux install – Command line

Whether you are installing a new standalone Linux OS or using VMware, Hyper-V, or Amazon EC2 to install Linux as a guest OS. When you you make a “minimal” Linux install, meaning, no GUI, only install the very basic packages just to get a functional command line. Networking will not be enabled by default. Many may find that very challenging because it is not as easy to just make few clicks with your mouse to configure your ethernet adapter. However, it is really not that difficult to get networking enabled.

First, after you log in as root, browse to “network-scripts” directory

cd /etc/sysconfig/network-scripts/

Type the command ls to display the directory content


You will find a file called ifcfg-eth0, that is your primary network adapter configuration file. If you have more than one network adapter, you will see ifcfg-eth0, ifcfg-eth1, ifcfg-eth2, etc.

Use vi to edit ifcfg-eth0

vi ifcfg-eth0

note, if you know you only have one networking adapter, you can skip all the steps mentioned above and as root, type

vi /etc/sysconfig/network-scripts/ifcfg-eth0


Press the insert key on your keyboard to get in edit mode in vi. look for the option:


Change the value to yes, so it will look like this:


That should be it. Restart the network adapter or just restart the operating system. Once the OS is back, networking should be enabled.


Hi, my name is Ali. I am a Systems Engineer. I live in the beautiful Evergreen state. I have a Bachelor degree of science in Information Technology with a handful of accompanying I.T. certificates. I also have a degree in Computer Networking. I am an Apple Certified Technician, Microsoft MCITP and a Linux expert.

Would you like to share your thoughts?