Configure the Debian Nic In shell

Source: Internet
Author: User
Tags nameserver
Run the command line (shell) to configure the Debian NIC-Linux Release Technology-Debian information. For more information, see the following. I have a 8139 Nic, so I will recognize it after Debian4.0 is installed. Because the DHCP method is used to automatically assign IP addresses for network installation, and there is only one basic system. In addition, I am a new linux user, so today I have been playing around for a while and completed the Debian network configuration.

I stated in advance that I did not install XORG to enhance my hands-on capabilities. It can be said that XORG is a pure shell system.

The configuration file of the Debian Nic is/etc/network/interfaces.

Here we use the VI editor to edit and modify this file.

Vi/etc/nerwork/interfaces

My configuration is as follows
======

Auto lo
Iface lo inet loopback
Address 127.0.0.1
Netmask 255.0.0.0

Auto eth0
Iface eth0 inet static # static address
Address 192.168.1.3 # the IP address is 192.168.1.3.
Netmask 255.255.255.0 # subnet mask 255.255.255.0
Gateway 192.168.1.1 # gateway 192.168.1.1
======
Then you need to set DNS

Vi/etc/resolv. conf

The DNS server in my region is as follows:
=====
Search domain
Nameserver 61.187.98.3
Nameserver 202.103.96.112
====

Is the setting successful? The following command

/Etc/init. d/networking restart

Ifconfig
Take a closer look at the English text. You should have the address and mask you just set. Then we can check whether the network is connected. Run the ping command.
First, check whether the gateway communication is normal. Some routers will block the PING in the LAN. Pay attention to this.
Ping 192.168.1.1-c 3
If a response is received, the LAN is normal.
Then, check whether the DNS system is normal.
Ping URL
If there is a response, the DNS system is also normal.

It is a great benefit to learn how to use the vi editor.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.