Learn the best post for Linux commands

xiaoxiao2021-03-06  48

Because this article is very valuable, it is indeed a good hand from Linux's beginners after master, and master it is equal to the door to Linux command, it is the best post of this year. The following is the most common command and use of Linux. When all master, no one dares to say that you will not Linux.

All rights reserved is that the plate is owned by everyone. You can publish your own name, you can also use my big name to propagate, as you like. Everyone share resources, common progress, China's software career can have hope! If this Articles Accelerate your footsteps you become a Linux master, prompting you to create a Linux company, fighting Redhat, eventually defeating Microsoft, then you again ... Basic Command LS: LS Ls -a "Show Hide File" LS -L "Displays file properties, including size, date, symbolic connection, whether to read and write and execute" ls --color = never * .so> OBJ "does not display text color, record all SO files to OBJ files "CD: CD CD / CD .." to the previous directory "CD ../." To the secondary directory "CD ~" GOTO User Directory "RM: RM RM -FR Directory" delete the Directory without ASK "CP: CP Source Target CP -AV Soure_Dir Target_Dir" Copy the entire directory, two directories "CP -FR SOURCE_DIR TARGET_DIR" copies the entire directory, and is replicated in a non-linked mode, when the Source directory comes with a symbolic link , Two directorys are different "MV: MV Source Target DIFF: DIFF DIR1 DIR2" Compare Dir1 and Dir2, IF Files in Dir1 But Not in Dir2, IT Will Be List "DIFF FILE1 FILE2" Compare File1 And File2, IF ANY DIFCERENCE, he will tell you "comm: comm file1 file2" compare file and file2, if any difference, the difference will be list "echo: echo message" display some characters in the console "cat: cat file" display the file's content in the console "Export: export lc_all =" Define vari Able lc_all is null "export display = 0: 0" Define variable display is 0:0 "Date: Date" list the time "Find: Find -name path file" find file in the path "grep: grep -ir" chars " Path "Find Chars in The Path" VI: VI File "File Edit Tools" Lynx: Lynx "TEXT BASE BROWSER" Man: Man Command "Help Command" StartX: StartX "Run GUI SYSTEM" Reboot: Reboot "Reboot Computer" HALT: HALT "Shutdown Computer" init: init 0 "Shut Down All Service" Init 1 "Restart All Service" Init 6 "Reboot Script"

advance command tar: tar xfzv file.tgz "uncompress file.tgz in the current directory" tar xfzv file.tgz -C target_path "uncompress file.tgz in the appoint directory" tar cfzv file.tgz source_path "compress appoint file to appoint tar Ball "Gzip: Gzip -d Source Target" Compress File "unzip: unzip source" unity "Dmesg: Dmesg" Show kernel booting information "uname: uname -r" show kernel version "more: ls | more" page display information "Strings" List "List File Chars" LIST FILE Chars, Page Display "RPM: RPM-I Program" Install Program "RPM2TARGZ: rpm2targz program.rpm program.tgz" Reforamt RMP to TAR Ball "SU : su root "SU User to root" Suloin: Sulogin / Dev / Tty4 "Waiting Login in TTY4" CHMOD: CHMOD A X File "Let File Can Be Excute" CHMOD 666 File "Let File Can Be Write" mknod: MKNOD / DEV / HDA1 B 3 1 "Make A Block Device" MKNOD / DEV / TTY1 C 4 1 "Make a Chare Device" Touch: Touch / TMP / Running "Touch A File" Sleep: Sleep 9 "Console Sleep 9 Seconds" LPD: LPD ST Op LPD Start LPD RESTART "RESTART Printer Service" LPR: LPR File.txt "Print A file ot.txt" Print A File Ot Printer "zhouPrint: zhpinrt -gb file.txt" Print A Chinese File to Printer "Disk Command FDisk fdisk / dev / hda" Creat OR Delete Disk Partition "CFDisk CFDisk / Dev / HDA" Creat Or Delete Disk Partition "Mount: mount -t ext2 / dev / hda1 / mnt" put / dev / hda1 loaded to / mnt directory "Mount -t ISO9660 / dev / cdrom / MNT Mount-T SMB //192.168.1.5/sharedir / mnt -o username = id, password =

ID mount -t nfs 192.168.1.1:/sharedir / mnt umount: umount / mnt "umount / mnt Directory" umount / dev / hda1 "umount device / dev / hda1" SYNC: SYNC "Write All Cache Into Disk" E2FSCK: E2FSCK / dev / hda1 "Check" E2FSCK -P "Check and Automatic Repair Disk" E2FSck -y "Check and Assume" YES "To All Questions" E2FSCK-C "Check Disk Bad Blocks" MKFS: MKFS / DEV / HDA1 "Format Pratitionk "mkswap: mfks / dev / hda9" format a swap partition "swapon: swapon / dev / hda9" Use a swap partition "swapoff: swapoff / dev / hda9" Close A Swap section "lilo: lilo" / etc / lilo. config is needed "lilo -C lilo.conf" configure disk boot loader "rdev: rdev bzImage" show root file system "rdev bzImage / dev / hda1" define / dev / hda1 as root file system "df: df" show mounted partition Use information "DD: DD if = root.ram of = / dev / ram0 DD if = / dev / fd0 of = root.ram DD if = / dev / zero of = root.ram BS = 1024, count = 1024 WHO: WHO "show logined user" Whoami: WHOAMI "Show Who am i" Whereis: Whereis command "show where is the command" Programer Comma ND GCC: GCC Hello.c "Compile Hello.c, Default Is A Dynamic Program" GCC Hello.c -o Hello "Compile Hello.c and out put file as hello" gcc -static -o hello hello.c "Compile A static program "strace: strace netscape" trace and list all open / write file by netscape program "ps: ps ps -ef" show running program pid "kill: kill -9 500" kill PID 500 "killall: killall -9 netscape" Kill Program Netscape "Top" Top "Free: Free" Show Free Memory "Time: Time Program"

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

New Post(0)