Format the memory as a disk in Linux

Source: Internet
Author: User
In Linux, the memory is formatted as a disk-general Linux technology-Linux technology and application information. The following is a detailed description. I have been busy with the learning tasks handed over to me by my brother-in-law last week, and I have not recorded many learning experiences in time. I will add them in the near future. In conjunction with the video tutorial from Mr Chu Guangming, I made my first test in Linux-formatting a piece of memory into a disk in Linux.

Because Linux also reflects the hardware in the form of folders, which are located under/dev. My idea is to find the memory location and mount it to/mnt in the format of a hard disk partition supported by Linux.

Commands and annotations are as follows:
# Cd/dev --/dev is the Device directory with a memory directory under it.
# Ls ram * -- find all files that meet the ram * conditions in the dev directory, that is, the memory.
# Mkfs-t ext3 ram1 -- convert the Memory Format of ram1 into EXT3 format, which is equivalent to a hard disk partition.
# Cd/mnt --/mnt is a folder mounted to various devices by default in Linux.
# Ls -- view the directory under/mnt
# Mkdir mem1 -- create a mem1 folder for memory mounting.
# Mount/dev/ram1/mnt/mem1 -- mount the memory ram1 to the/mnt/mem1 directory.
# Df -- view system usage
# Cd mem1 -- enter the mem1 directory
# Ls -- view the mem1 directory. If everything is normal, there will be only one lost + found folder.

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.