Linux Memo

xiaoxiao2021-03-06  66

1. All the operations of the root user on the keyboard will be recorded in the system. This file is

/Root/.bash_historyoshiy

Each user's operation is recorded in the .bash_historyoshiy file in your own directory. 2. What should I do if I do to uninstall Make Install? The answer is deleted directly. Don't think that the procedure directly delete the program will leave garbage, causing "system unstable". Make install is nothing more than putting the executable program in / usr / local / bin, putting some of the library in / usr / local / lib, putting the data file in / usr / local / share Next it its own directory, you If you delete these things, you won't leave garbage. Even if you really leave a little file, you can't delete it, you can't cause system unstable. Unix is ​​so simple. 3, IFCONFIG Tool 1) Set the IP address of the first block to 192.168.0.1: ifconfig et0 192.168.0.1 (Format: ifconfig network device name IP address) 2) Temporarily close or enable NIC: Close the first network card: ifconfig Eth0 Down Enables the first network card: ifconfig eth0 Up 3) Set the subnet mask of the first block to 255.255.255.0: ifconfig eth0 Netmask 255.255.255.0 (Format: ifconfig network device name Netmask subnet mask) We also You can set the IP address and subnet mask at the same time: ifconfig eth0 192.168.0.1 Netmask 255.255.255.0 4) Set the broadcast address of the first network card to 192.168.0.255: ifconfig eth0 -Broadcast 192.168.0.255 5) Put the first network card setting In order not to receive multicast packets: ifconifg eth0 AllMulti If you want to receive it, use the command: ifconfig eth0 -allmulti 6) View the status of the first network card: ifconfig eth0 If you want to see all the NIC status, you do not use it directly The IFCONFIG command of the parameter. The status information of ifconfig output is very useful. Here, we will briefly describe: There are several status comparison: Ø UP / DOWN: NIC is started, if it is Down, then it is certainly unused; Ø RX Packet The number of ErrorS package If you have any problems in reception; Ø The number of ErrorS package in tx packets If you have a problem when you send it, there is a problem when sending; 4, the route tool Route command is used to view and set up Linux systems Routing information to implement communication with other networks. To achieve network communication between two different subnets, you need a gateway that connects two network routers or at the same time in two networks. In the Linux system, we usually set the route to address the following questions: This Linux machine has a gateway in a local area network, which allows your machine to access the Internet, then we need to set the IP address of this machine to The default route for the Linux machine.

1) Add a default route: Route Add 0.0.0.0 GW Gateway Address 2) Delete a default route: Route del 0.0.0 GW Gateway Address 3) Show current routing table ROUTE 5, PING Tool 1) Detection with a machine Whether it is normal: ping 192.168.0.1 Ping www.linuxaid.com.cn That is, we can use the IP address or domain name to specify the machine. 2) Specifying the number of ping responses is 4: Under Linux, if you do not specify the number of responses, the ping command will continue to send ICMP information to the remote machine. We can define the -c parameter: ping -c 4 192.168.0.1 3) Ping through a specific network card: Sometimes we need to detect a block (multiple blocks in the system) can ping the farm machine. We need to point out when executing the ping command: ping -i eth0 192.168.0.1

转载请注明原文地址:https://www.9cbs.com/read-110318.html

New Post(0)