Linux disk partitioning and common Linux commands

Source: Internet
Author: User

Disk partitioning is actually changing the contents of the Dpt-Disk partition table (64Bytes, 16 bytes per partition table). linux fdisk  Interactive partition test (note that the primary partition must not exceed 4-disk requirements, the extended partition has only one-): 1, add a virtual disk to the virtual machine, assuming that the SCSI disk, its device is   /DEV/SDB2, Execute commands   : fdisk /dev/sdb   partition as prompted to use the relevant commands for partitioning. n  -  Create new partition q -  Exit Do not save w -  write partition information to disk partition table 3, notify operating system, disk partition Table change command  :  partprobe /dev/sdbll /dev/sd*   See if you can see the new disk partition 4, format the partition (assuming there is a partition/DEV/SDB1) command  :  mkfs.ext4   (or  mkfs.ext2)   Formatting essence is to create a filesystem (write block size, inode information, etc.) on a disk partition 5, mount the partition to a file directory of the Linux system (/ MNT) mount /dev/sdb1 /mntdf -l   Command View note  : fdisk  generally for disk size less than 2T, if greater than 2T, You need to use the parted  command &nbsp, and of course parted can partition less than 2T of disk. parted non-interactive partition instance  , 1G  disk partition  :parted /dev/sdb  mklabel  gpt  The          # parted  command needs to convert the entire disk into GPT format parted  / dev/sdb  mkpart  primary  0  500  #  Primary Partition   from 0m  to  500Mparted  /dev/sdb  mkpart  primary  501   1000  #  primary partition   from 501m  to  1000Mparted  /dev/sdb  pmkfs  -t ext4  /dev/sdb1 /dev/sdb2      #  Formatting     sdb1 sdb2  mount  /dev/sdb2   /temp    #   Mount disk partition to  /temp  directory    ???  ? fdisk  How to non-interactive partition  ????     ----using expect tools  ================================================================== ==========================================--------------------------------------------------Linux Operations commands to master: File and directory operations: LS  , cd , cp,find , mkdir ,mv , pwd ,rename  ,rm  ,rmdir , touch ,tree , basename , dirname ,chattr ,  Lsattr , file ,md5sum  . View file and content operations: CAT ,TAC , MORE , LESS ,HEAD ,TAIL ,CUT ,SPLIT   paste , sort , uniq , wc , iconv , dos2unix ,  file , diff , vimdiff , rev ,grep ,egrep , join , tr , vi/vim  . file compression and Decompression commands  :tar , unzip , gzip ,  zip   Information Display Command  :uname , hostname , dmesg , uptime , file ,stat  ,du , df , top ,free ,  date ,cal  Search File Commands  :  which ,find ,  whereis , locate  User Management Commands  : useradd ,  Usermod , userdel , groupadd , passwd , chage ,  id  , su , visudo , sudo  Basic Network Operations Commands  :telnet , ssh ,   scp ,&nbSp; wget , ping ,route , ifconfig ,ifup ,ifdown , netstat   Deep Network Operations Command  :nmap , lsof , route , mail , mutt ,  nslookup , dig ,host , traceroute , tcpdump  disk with file system  :mount   unmount ,df ,du , fsck ,  dd , dumpe2fs , dump  ,fdisk ,  parted , mkfs ,parteprobe , e2fsck ,mkswap ,  swapon , sync , resize2fs  shutdown and view system commands  :shutdown ,  halt  , init  System Management Related  :uptime , top ,free , vmstat ,  mpstat  ,  iostat , sar , chkconfig  system security Related  :chmod , chown  , chgrp , chage , passwd , su , sudo , umask  ,chattr , lsattr  View System login user Information  :whoami , who ,  w  , last , lastlog  , users ,finger  other  :echo ,printf , rmp , yum ,watch  , alias , unalias , date ,clear ,history , eject ,time  ,nohup ,nc , xargs ,exec , export , unset ,bc ,type   System performance monitoring advanced commands  :   memory  : top , free ,vmstat , mpstat  Iostat ,sar   cpu : top ,vmstat , mpstat ,iostat ,sar    I/O : vmstat , mpstat ,iostat ,sar     Process:  ipcs ,ipcrm ,lsof ,strace ,lstrace    Load  : uptime     Shutdown/restart/logoff  : Power off restart  :shutdown , init , halt ,poweroff ,reboot   Logoff exit: logout ,exit , ctrl + d  --"Production common process management: Bg , fg ,jobs ,kill ,killall  ,pkill ,crontab, ps , pstree ,top ,nice ,nohup , pgrep  , strace , ltrace ,vmstat , runlevel init  service  More dangerous orders.  ;mv ,rm ,fdisk ,parted ,dd linux System Four Musketeers  :   grep  , Egrep ,sed ,awk


Linux disk partitioning and common Linux commands

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.