Debian system configuration static IP address method

Source: Internet
Author: User

Debian Configuration Static IP

First of all, my environment, WIN8 Pro operating system, installed the VBox virtual machine, and created a X64 Debian Linux virtual machine.

Why should I configure static IP?

In order to realize the local network interoperability with the virtual machine. Because most of the more fashionable companies use the Linux operating system as a service, I used to use x86 's operating system, and then the system integration engineer Alex colleague told me that the server is generally x64 because it supports larger memory extensions.

Why didn't I think of it ...

Let's get acquainted with the VI editor first.

Debian defaults to provide the VI editor, to tell the truth the difficulty for me such a pure development is really still a bit large, so you can choose to update the Vim editor, to see the Update command bar (using the command, please open your terminal with the root user).

OK, let's update the editor based on the command line ...

If you install a compact version of Debian, fully automated installation. If installed offline package Bebian, load your ISO file.

root@debian64:/# Apt-get Install Vim
VI Editor This artifact in the Linux terminal, can help us edit a variety of text, configuration files, and even the legend that Daniel likes to use the VI Editor to write code.

Using the VI Editor to open/etc/network/interfaces files

root@debian64:/# vi/etc/network/interfaces

Of course I don't mind you using the TAB key to get the path information quickly.

Yes, then there are 1mol of things that don't know anything.

E325: note
Discovery Interchange File "/ETC/NETWORK/.INTERFACES.SWP"
Owner: root Date: Sat Sep 20 13:46:19 2014
FileName:/etc/network/interfaces
Modified: Yes
User name: Root host Name: Debian64
Process id:3785 (still running)
Opening file "/etc/network/interfaces"

Date: Mon Sep 29 14:09:22 2014
Newer than exchanging files!

(1) Another program may editing the same file. If the case,
Be careful the two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If so, please use ": Recover" or "vim-r/etc/network/interfaces"
Restore the modified content (see ": Help Recovery").
If you have already recovered, please delete the swap file "/ETC/NETWORK/.INTERFACES.SWP"
To avoid seeing this message again.

Swap file "/ETC/NETWORK/.INTERFACES.SWP" already exists!

We're going to start editing.

Please type the letter "E" so that you are in the editing state.

Exit directly, do not save, type "q!"

Save and exit, the shortcut key CTRL + X or press ESC to continue typing ": X" to enter a carriage return.

Mastering so many skills can completely control the VI editor, we go to the next stage.

Interfaces configuration file Contents
# This file describes the network interfaces available on your system
# and how to activate them. For more information, interfaces (5).

# The Loopback network interface
Auto Lo
Auto Eth0 #开启自动连接网络
Iface Lo inet Loopback
Allow-hotplug eth0
Iface eth0 inet Static
Address 192.168.1.104 # IP
netmask 255.255.255.0 # Subnet Mask
Gateway 192.168.1.1 # Gateways

The modification is complete and saved, and the result is that nothing has happened.

Let's reboot the network configuration and load the updated configuration file

root@debian64:/# Service Networking Restart

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.