Disk partitioning, formatting, mounting under Linux

Source: Internet
Author: User

File names for various devices under Linux

Experiment:

1) Add a 15G SCSI hard disk before opening the Linux system
2) Turn on the system, right click on the desktop, open the terminal
3) for the newly added hard disk partition, a primary partition size of 5G, the remaining space to the extended partition, on the extended partition divided 1 logical partitions, the size of 5G
4) format primary partition as EXT3 system
5) Set logical partition to swap partition
6) enable the Swap partition for the previous step
7) View the status of the swap partition

View device information under Linux

[Email protected] ~]# ls/dev/sd*
/dev/sda/dev/sda1/dev/sda2 /dev/sdb

View disk partition information

[Email protected] ~]# df-h
File system capacity has been used with available% mount points
/dev/mapper/centos-root 18G 7.2G 11G 42%/
Devtmpfs 228M 0 228M 0%/dev
Tmpfs 237M 0 237M 0%/dev/shm
Tmpfs 237M 4.6M 233M 2%/run
Tmpfs 237M 0 237M 0%/sys/fs/cgroup
/DEV/SDA1 497M 123M 375M 25%/boot
Tmpfs 48M 0 48M 0%/run/user/0

Disk partitioning

Fdisk/dev/sdb

[Email protected] ~]# Fdisk/dev/sdb
You are welcome to use FDISK (Util-linux 2.23.2).

The changes will remain in memory until you decide to write the changes to disk.
Think twice before you use the Write command.


Command (enter M for help):

Disk partitioning, formatting, mounting under Linux

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.