How To Set Up Internet On Linux

Table of contents:

How To Set Up Internet On Linux
How To Set Up Internet On Linux

Video: How To Set Up Internet On Linux

Video: How To Set Up Internet On Linux
Video: How To Connect To The Internet From The Command Line On Linux 2024, December
Anonim

Having installed Linux OS on your computer, sooner or later you will face the issue of connecting to the Internet. Setting up the Internet on Linux is different from setting up on Windows. So forget the familiar menu of choices and prompts, and follow the directions.

How to set up internet on Linux
How to set up internet on Linux

Instructions

Step 1

Open your console and write ifconfig.

Step 2

If an error appears, write su, enter the main administrator password and write ifconfig again. This command will show information about the network connections currently connected and the degree to which their parameters are configured. Then you need to take the settings received from your Internet provider.

Step 3

Now the most important thing to set up the Internet on Linux:

- open the configuration file sudo gedit / etc / network / interfaces, gedit is the editor used;

- in this file, enter the Internet settings. If you have a static IP address, then write using the template:

auto eth0 - instant loading of the network interface;

iface eth0 inet static - prevents the hijacking of someone else's IP;

address ---. ---. ---.- your IP;

netmask ---. ---. ---.- enter the mask here;

broadcast ---. ---. ---.--- leave this line unchanged or do not write at all;

hostname myname - enter your network name in this line;

gateway ---. ---. ---.- here enter the gateway of your ISP.

Step 4

In the event that you do not have Internet settings or the IP address is static, the following template:

auto eth0 - instant loading of the network interface;

iface eth0 inet dhcp - allows you to get IP automatically.

Step 5

Save your settings.

Step 6

Restart the internet.

Step 7

Register DNS, for which enter:

sudo /etc/resolv.conf - this command will open a file with DNS servers.

nameserver ---. ---. ---.- here enter the DNS of your ISP

nameserver ---. ---. ---.- enter any alternate DNS.

Step 8

Restart the internet.

Step 9

Check the availability of the Internet - enter ping ya.ru.

This completes the setup, it turns out that setting up the Internet on Linux is not so difficult.

Recommended: