# Operating System: Ubuntu13.04
#
# Author: Sunny
#文章地址:http://blog.csdn.net/sunnypotter/article /details/22598201
# Set Static IP:
#
# Preparation:
# 1. View the network card, IP and subnet in use Mask netmask, mine is eth0
ifconfig
eth0 Link encap:Ethernet HWaddr ec:9a:74:36:c8:8c
inet addr:192.168.1.100 Bcast: 192.168.1.255 Mask: 255.255.255.0
# IP:192.168.1.100, netmask:255.255.255.0
# 2. View gateway gateway
route -n< Br>
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
# gateway: 192.168.1.1
# dns: 192.168.1.1 # Normally and gateway, of course, you can also set other dns
# 3. Start setting static ip
sudo vim /etc/network/interfaces
*********
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface Lo inet loopback
# Set Static IP
auto eth0 # My NIC
iface eth0 inet static # Static, as opposed to dynamic (dhcp, ie face eth0 inet dhcp)
address 192.168. 1.100 # You can set the available ip on the same network segment, such as 192.168.1.102
gateway 192.168.1.1 # gateway
netmask 255.255.255.0 #subnet mask
dns -nameservers 192.168.1.1 # Multiple dns can be set, or not set here, edit /etc/resolv.conf dns-nameservers 114.114.114.114
# 4, restart the network card
sudo service Networking restart
# or sudo /etc/init.d/networking restart
# Still not, please restart reboot
# Note:
# When dns-nameservers is not set, you need to manually add
in /etc/resolv.conf sudo vim /etc/resolv.cof
nameserver 192.168.1.1
# :
In a relatively early version, you need to set the resolv.conf file in /etc and add nameserver so that you can connect to the Internet, otherwise you can only access it via ip and cannot resolve the URL. (nslookup Can view the URL ip, of course, you must You must have dns first.
After Ubuntu 12.04, this method is no longer recommended, because whatever value you want to set in the configuration file will be restored to the initial state after restarting. (Of course does not include the boot startup script automatically set)
The recommended practice is to add dns-nameservers <gateway ip> directly to the interfaces configuration file.
Liunx shared file server uses samba, so the linux shared server is to set up the samba server; 1, n
In general, there are three main ways to install software under Linux: one is source install
Lab environment: Under Vbox, Rehat5 virtual machine Using samba server Purpose: Upload file to serv
Detailed explanation of Linux commands find
The difference between buffer and cache in linux free command
/etc/fstab file error, unable to enter Linux system
Modify the Linux default startup level or mode
Linux Advanced Users, Groups and Permissions Introduction
Vsftpd 530 in linux owing to the underlying solution
Linux server network related kernel parameters
Linux practical skills: use ntfs-3g mount ntfs equipment
Based on redhat6.4 local yum and ftpyum source configuration
Linux upgrade command yum upgrade and yum update difference
Turning off the annoying notification feature
Windows shortcuts Daquan Play Windows 8 between applause
In-depth analysis of Windows operating system crashes (2)
Drivers for Win8 New Interface Device Manager
WinXP loses SYSTEM file and can't start solution
Win7 system detected conflict with simulation program graphic tutorial
The basics of using the shell under Linux
How to install and start Telnet service under Win7 pure version system