Linux Notebooks (CentOS)

Source: Internet
Author: User
Tags create directory

Switch User: Su as Administrator: sudo display file contents: Ls-sail mysql* (keyword filtering) Create file: Touch A1 Edit File: VI A1 copy file: CP Source Destination Rename (move): mv a B Delete: Rm-i a Create directory: mkdir A delete directory: RmDir A (must be empty) if it is not empty, the parameter deletion parameter should be removed: rm-r a recursive delete directory rm-rf a no warning delete file type: Text file/executable/data file check Look type: Stat A (Details) file a (file type) view entire files: Cat A-n (add line number) more [ENTER (next line)]/less View process: Ps-ef (e: Show All Processes, F: full format output Out) End process: Kill DIP (Process number) Killall A * (wildcard supported) Mount Media: mount-t vfat (File system type)/dev/sdbl/media/disk (if you can manually hang the U disk on disk) Uninstall the device: Umoun T/HOME/RICH/MNT View disk space: df-h (file size) sort (sort data rows): Sort-n (by maiden Letter) A (text file) large file search data: grep key File1 (Find key in File1 row) compression (. bz2): bzip2 A extract: bunzip2 a.bz2 data archive: TAR-CVF A.tar b C (archive B, c as A.tar) TAR-TF A.tar (list content, no pressure  ) TAR-XVF A.tar Decompression environment variable: printenv (Global) echo $HOME (output variable) set (local) new Shell:bash (Open child shell)/exit (exit current) Set global variable: Export Test Delete environment variable: unset test set PATH environment variable: path= $PATH:/home/user/test variable array: mytest= (one, three four) output: Echo ${mytest[*]} Delete meta Vegetarian: unset mytest[2] Add User: useradd-d-S (set default login shell)/bin/tsch tEST (user name) Delete:/user/sbin/userdel-r test modify account password: usermod-l (username)/-p (password) Set directory permissions: Umask 666 Change permissions: CHOMD 760 a/chmod u+x A (U-User Rights Limit, +-+ add permission, X-execute immediately) create partition: sudo fdisk/dev/sdc browse partition Command:n create partition: W Save format: sudo mkfs.ext4/dev/sdcl (m kfs.ext4-Create Ext4 File system) Create mount point: Dudo mkdir/mnt/testing mount: sudo mount-t ext4/dev/sdcl/mnt/testing repair file system: fsck options (Option/ How to fix) ared hat system software Management: Yum List installed > installed_softname (listed as Text) view package details: Yum list xterm (prevent flashing)/yum list Installe D xterm Installation: Yum install package_name temporary switch to root user: Su-install text file: Yum localinstall package_name.rpm lists available updates for installed packages: Yum list updat ES update: Yum update package_name all: Yum update uninstall software: Yum remove package_name (retention profile) Yum Erose PA Ckage_name (do not keep all files) handle the dependency of the corrupted package: Yum Clean all + uses Yum update to clear the misplaced file display dependencies: Yum deplist package_name ignore dependencies: Yu    M update __skip_broken get software from library: Yum repdist open source software compilation installation: 1./configure 2 make 3 made install Text Editor: Vim myprog.c (open, no buffer created)        Save the buffer dataset and exit: Q Not modified exit                                   QL does not save the exit W filename saved as .... The WQ buffer is saved to the file and exits the Edit command: ZX removes the copy of the cursor with the climate two-character visual mode: v key to select Y-key assignment P paste Find, replace: s/old/new/new replace old, first bit Replace the old $s between n,m by replacing one line n,ms/old/new/g s/old/new/g/old/new/g Replace all old%s/old/new/gc in the entire file with all old, each prompt

Linux Notebooks (CentOS)

Related Article

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.