My Linux Learning Notes
Http://www.blogjava.net/huanzhugege/archive/2007/08/23/linux.html
1
Top look at the currently running process
Kill-9 PID terminates a process (tree)
The CD returns to the root directory
PWD Displays the current directory
3 Less more view text file instructions entering the V key in less will start VI editing the current file
4 mkdir, RM MV commands to change the file name and directory name
CP Copy files and directories command
The man command uses the method reference tool, which is useful
The Nano is a small, free, and friendly editor
5
VI has two modes, one is command mode and one is edit mode. After entering VI, the default is in command mode.
Now we execute VI loveletter. After entering, click on the keyboard Insert function keys or I can enter the editing state, you can insert characters, and then click Insert into the cover mode, the difference between the two modes is easy to reflect, we can try it. Up and down four arrow keys to move the cursor. There is no difference between basic editing commands and Windows. Isn't it easy? When you have the required content input completed, we want to save, at this time click the ESC key from edit mode back to command mode, first enter a colon ":", that is, hold down the SHIFT key and then press the semicolon ";" So first enter a ":", then, enter W, return, you can save our edited content to the Loveletter file. Now we can press insert to continue editing. Press ESC again, enter ":", and then press W to save. But now we don't need to save, we want to quit without saving, how to do it? When we enter w is the meaning of write, save, then we enter Q is quit the meaning of quit. OK, input q, enter, vi hints we have just made the changes have not been saved, so remember! Once we need to discard our changes, we can not directly exit with the Q command, and we need to use "q!" Command. Input q!, OK, quit.
We want to see if the Loveletter we just edited was really saved, and then VI Loveletter,ok, see? Now we want to exit directly, you can just enter ": Q" on it, do not enter that "!" Because we did not modify the contents of the file. If we revise this article, we can enter "Esc:wq" when we exit. You do not need to divide W and Q into two inputs.
6 Linux can be attached to the ISO file as a directory using the amount command: Mount-t iso9660-o loop/home/kris/somewhat.iso/mnt/cdrom
7 Types of file check files
8 Wall Write MESG
9 Reset Reset Terminal, use this method when a problem occurs on the screen
env Display Environment variables
11 ways to change the system language: Run Export lc_all= "en_US" can be changed into English. To always output the E-text. You can change the lang= "en_US in/etc/sysconfig/i18n. Utf-8 "
12 View native Ip:ifconfig-a
Mount CD: Mount/dev/cdrom/mnt/cdrom, then you can see the contents of the disc in the/mnt/cdrom. Use Umount/mnt/cdromo to unmount the disc. You can eject a disc only after you unmount it.
14 in the Linux prompt to enter the file name, etc., you can enter a portion of the file name and then press the TAB key to complete the smart.
How to install RPM package in Redhat: Rpm-i "package path"; To upgrade a package you can rpm-u PackageName. The removal of the package is easier, using: # RPM-E PackageName is able to delete the package you want to delete, do not need to know the version and path
16 Start and run the Vsftp method, run Ntsysv, and select Vsftpd in the list.
17 Viewing file contents: Cat file name
Find/-name "*network*"-print look for all files that contain the network in the root directory
Find/-iname "*network*"-print finds all files containing the network in the root directory, ignoring case
Useradd user1 set up a user, but the user is not able to use the password before the user, the command to set the password is passwd user1
When you have the "*" sign next to the file name, it is an executable file and runs as long as you run the */file name.
21 Restart Network Service restart
22 character interface into the graphical interface: startx, graphical interface return character interface: Logout.
23 Install VMware, then the virtual Machine network type Select NAT to achieve the communication between the host and the virtual machine, to Telnet to Linux also need to install Telnet service, root by default cannot telnet login
24 Delete Non-empty directory: RM-RF directory name
25 ways to Decompress Cpio: CPIO-IDMV < ***.cpio
The shell script that you edit in your UE is run to UNIX in the prompt "H^m:is not a identifier", Workaround: Dtox a.txt >b.txt to UNIX format, or use "file" in UE to convert "DOS to UNIX" feature. The second is more convenient
Find/usr-name httpd
28 Decompression Some.tgz Method: First gunzip some.tgz, generate Some.tar, and then TAR-XVF Some.tar decompression
29 ways to join GCC to a path:
Path= $PATH:/usr/gnu/bin/
Export PATH
The value of the variable in the SH script cannot have spaces on either side of the equals sign
There can be no blank line between the command lines in the SH script, and there are spaces before and after the IF statement
32 Judging the current terminal type echo $TERM
33 How to retrieve IP:/etc/init.d/network restart
How to enter the ESC escape character in Linux: Press CTRL + V first, then press the ESC key
35 after the way to run a program, that is, script exit, Shell exit will not cause the program to exit: Add "&" after the command
36 The Login self-initiated script is placed in the "/etc/profile" file, such as configuring the Java environment variables to be included in this file:
Pathmunge/usr/java/j2re1.4.2_14/bin/after
Java_home= "/usr/java/j2re1.4.2_14/"
Note that there can be no spaces on either side of the equal sign in java_home, otherwise java_home will be treated as a command!!!!!!!!!!!!!!!!!!! 1
37 If the system appears garbled modify the lang environment variable can be. This problem has occurred in the previous batch system
"Traceroute IP Address" of Linux under the trace of Windows
Under the Linux flash drive method, insert a USB flash drive, create a directory USB under MNT, and then run "Fdisk-l", which will show all the devices, because the normal USB drive is fat format, so find the format of the fat hard disk identifier, such as SDB1, and then run Mount- T Vfat/dev/sdb1/mnt/usb, so that the U disk will be attached to the/MNT/USB, unloading time UMOUNT/MNT/USB
Linux basic commands