Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the mounted directory of the hard disk by Linux

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how Linux modifies the directory that has been mounted on the hard disk". In daily operation, I believe many people have doubts about how to modify the directory mounted on the hard disk by Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to modify the directory that has been mounted on the hard disk by Linux". Next, please follow the editor to study!

Linux system hard disk mount directory, usually will not modify it, but sometimes because of work or personal needs, to modify the hard disk mounted directory, how to operate? The following is an example to explain how Linux changes the mounted directory of the hard disk, and friends in need may wish to learn.

Many domestic IDC will divide the hard disk into two pieces, the system disk and the data disk, especially some businesses that use cloud technology. This kind of disk usually reads and writes faster than the data disk. If you don't care about the size of the hard disk, you can ignore the data disk, and it's good to use it as a backup. But if the website all generates static, then you need a large hard disk, in fact, it is very easy to modify the mounted partition of the hard disk.

For example, if you want to mount a hard disk that is already mounted on the home directory to the data directory, do the following

# df-h (check partition and data disk name)

# mkdir / data (create a directory if there is no data, otherwise skip this step)

# umount / home (uninstall the home directory mounted on the hard disk)

# mount / dev/sdb1 / data (mounted to the data directory)

# vi / etc/fstab (edit fstab file, modify or add, so that it can be mounted automatically after restart)

/ dev/sdb1 / data ext3 auto 0 0

New data disk mount directory

Edit the / home in / etc/fstab to / data, or create it to automatically mount to / data when the system starts.

At this point, the study on "how to modify the mounted directory of the hard disk by Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report