Linux File dns settings vi usage tips

Source: Internet
Author: User

Linux Files are quite common. So I studied the Linux Files and shared them with you here. I hope they will be useful to you. /Etc/resolv. conf file with the following content: domain 21php.com/* specifies the default domain,

Linux File dns settings

Do not specify the dns server address */nameserver 11.0.0.1/*. You can write up to three addresses, as the candidate dns server for the previous failure */use/etc/rc after modification. d/init. d/named restart to make the modification take effect -- (Note: The command in fc6 seems to be invalid and will take effect after the file is modified)

Description of other related files/etc/hosts file 127.0.0.1 localhost. localdomain localhost/* defines the host Name and IP address, and the IP address and host Name of the computer to run dns */etc/host. the conf file "order hosts bind" statement specifies that the resolution order for the host name is first found in hosts, and then found in the dns server record. "Multi on" allows a host name to correspond to multiple IP addresses. Content:

 
 
  1. order hosts, bind   
  2. multi on   
  3. nospoof on 

Linux file/etc/resolv. conf file

Domain 21php.com/* specifies the default domain */nameserver 11.0.0.1/* specifies the address of the dns server. You can write up to three addresses as the candidate dns server for the previous failure */

Linux file/etc/named. boot file

The configuration file used by the bind software in earlier versions is now available in "named. conf" in the new version ". Named. conf is the core file of dns server configuration.

Linux file/etc/sysconfig/static-routes File

Static route configuration file in the following format:

 
 
  1. eth0 net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1  
  2. eth1 net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 

To add a Linux File, run the following command:

 
 
  1. route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 eth0  
  2. route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 eth1 

Linux File vi usage tips

 
 
  1. H: move one character to the left. j: move one character down. k: move one character up. l: move one character to the right.
  2. I: switch from command mode to text insertion and editing mode. "x": delete a character in command mode. "dd": delete a row in command mode.
  3. Esc: return command mode ": q! ": Do not save and exit in command mode
  4. ": Wq": Saving and exiting in command mode ": wq! ": Force save and exit in command mode"/OK ": Find the OK string in the text
  5. ": &": The last line in command mode to text "space": Text flip
  6.  
  7. U: You can use less and more to view text files at one Undo operation.

View Linux File Processes

 
 
  1. # Query real-time processes. Press "1" to view the real-time usage of each cpu.
  2. Top
  3. # Search for processes that contain tomcat fields in the process
  4. Ps-ef | grep tomcat
  5. # Display all processes
  6. Ps-aux
  7. # Display all processes by PAGE
  8. Ps-aux | more

View Linux File network conditions

 
 
  1. Netstat-antp/* view all ports */
  2. Netstat-antp | grep mysql/* view the port opened by mysql */
  3. Setnumber: add the row number to the file, and enter the second line through number, for example, 2. Software Download wget http address

Linux File Package Processing

 
 
  1. Rpm-qa/** // * Find all software packages */
  2. Rpm-qa | grep mail/** // * search for software packages containing mail characters */
  3. Rpm-e **/** // * Uninstall a software package */
  4. Rpm-ivh **/** // * install XX Software Package */
  5. Rpm-ql ** | cat-n/** // * view the installation information of the software package */

Using the RPM upgrade package in the Linux File is similar to installing the package, as long as you type the following command in the shell prompt: # rpm-Uvh foo-2.0-1.i386.rpm you can not see in the above example is, RPM automatically deletes any old version of the foo package.

In fact, you may always want to use-U to install the software package, because it can be used to install the software package even if no previous version of the software package is installed. When the software can be installed normally for the first time and an error is reported during the next installation, you can use # To clear the cache and compile and install make clean again.

Supplement: 1. make compiles the c \ c ++ file into a *. o file based on the makefile rules, and then generates an executable file. 2. make clean Delete source code C \ C ++ code) generated execution file and all intermediate target files 3. make depend is a makefile rule. It scans all C \ C ++ code in each directory to determine the dependency between files, such as. b. h (for example, include <B. h>), if. if the cc file is changed, you only need to recompile. cc file, no need to compile B. h file. Otherwise, all files must be re-compiled.

  1. Partitioning and formatting Linux USB flash disks and creating Linux File Systems
  2. How to detach a linux File System from a computer
  3. Linux File Installation and uninstallation
  4. Command to remove Linux File Attributes
  5. Detailed introduction to Linux File Types

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.