Below are some of my personal study notes for my personal use only.
Set the Host Name of the system: hostname linux. test (you can directly use hostname to display the Host Name of the current system)Enable eth0: ifconfig eth0 up (down) or ifup eht0View network configuration: ifconfig-Set IP Address: ifconfig eth0 192.168.1.45 netmask 255.255.255.0 up (up indicates immediate activation)
Restart network settings: service network restartView the current
Linux command line set IP, gateway, and DNSIP and Subnet Masks execute this command: ifconfig eth0 192.168.1.123 netmask 255.255.255.0Write these two commands in/etc/rc.local or/etc/rc.d/rc.local, so you can keep them permanently./etc/sysconfig/network Set the default gateway, host name, whether to start the network 3 items;/ETC/SYSCONFIG/NETWORK-SCRIPT/IFCFG-ETH
Copy Code code as follows:
:: Get the NIC name with the Ipconfig/all command.
for/f "tokens=2*"%%i in (' ipconfig/all^|find/i "Ethernet adapter" ') do set name=%%j
:: Remove the colon after the network card name with the for command.
for/f "tokens=1* delims=:"%%i in ("%name%") do set network card name =%%i
Apply the above script to modify DNS, such as the national DNS server crashed yesterday, the DNS changed to 202.96.199.132 can return to normal Internet.
modifying DNS
Because the company's intranet gateway and intranet IP address is not in a network segment, linux can not connect to the Internet, the solution is as follows: 1.vim/ etc/rc. local2. add the following two routeadd-host192.168.100.254deveth0routeadddefaultgw192.168.100.254...
Because the company's intranet gateway and intranet
This technique is very useful for friends who often use laptops for business trips, such as in another environment, such as the customer's company, you always need to change the network to someone else's intranet address, gateway, DNS, and so on. Write a batch processing file, and then change it to the next one. It's faster than the mouse operation.
Form: http://blog.csdn.net/zmxjModify the IP address, sub
ifconfig wlan0 HW ether 00: 11: 22: 33: 44: 55Siocsifhwaddr: the device or resource is busy.[Yeger @ yeger ~] $ Ifconfig wlan0 downSiocsifflags: insufficient Permissions[Yeger @ yeger ~] $ Sudo ifconfig wlan0 down[Yeger @ yeger ~] $ Sudo ifconfig wlan0 HW ether 00: 11: 22: 33: 44: 55Changed
[Yeger @ yeger ~] $ Netstat-ant view port information a all N numbers display t TCP protocol u udp protocolActive Internet connections (servers and established have established a connection)PROTO Recv-Q send
Note: System: debian6.0.4IP address: 192.168.21.166 subnet mask: 255.255.255.0 Gateway: 192.168.21.2DNS: 8.8.8.88.8.4.4 operation: System O M reminder: qihang01 original content copyright, reprinted, please indicate the source and original article links 1. set the IP address, Gateway nano/etc/network/inte
Note:
System: debian 6.0.4IP address: 192.168.21.166Subne
For details about how to change the ip address-gateway-host name-DNS in linux, refer to general Linux technology-Linux technology and application information. /Etc/sysconfig/network-scripts/has a configuration file
For example, the file: ifcfg-eth0 represents the configuration file of the actual Ethernet NIC 0
Modify IP Address
Effective immediately: # ifcon
Linux (1): linux change IP address command _ change DNS _ change default gateway _ change subnet mask _ host name, linuxdns
How to use commands to change the linux IP address, DNS, and subnet mask, and add a Linux virtual machine to the Virtual Machine (vitrualBox;
Installation: http://pan.baidu.com/s/1sjJPhP7
After installation, go to the Linux desktop, which i
Windows7 The default gateway cannot save IP resolutionThe first type:First step: Click on the bottom left corner of the win icon or win icon +r can also, input cmd and then enter, open the DOS mode window.The second step: at the DOS command line prompt input: "netsh winsock reset", entered in quotation marks, does not contain quotation marks, and then enter, prompting the need to restart, temporarily do not
machine, right-click the network in the lower right corner, open the Network Center, you will see this:Settings, Properties-"ip4-" settingHere the IP address is preferably the virtual machine inside the gateway set;After setting up, let's try it and see if we can ping it through:Can ping the pass, then we set his hostname:Here, basically the virtual machine system can be used, we can use Remote Tools to co
1th Step: Open your computer's browser, in the address bar to enter your router IP address, if your router has not set the IP address, the general default is 192.168.1.1 this address, in the address bar input 192.168.1.1.
2nd Step: The screen will pop up dialog box, in the corresponding space in the dialog box to enter your router's password and account number, similarly, if your router is not
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.