linux下如何删除磁盘分区

linux下如何删除磁盘分区... linux下如何删除磁盘分区 展开
 我来答
骑着野牛飞天
推荐于2017-09-13 · TA获得超过4365个赞
知道大有可为答主
回答量:1036
采纳率:0%
帮助的人:2388万
展开全部
分区示例:比如分/dev/sda 硬盘
  #: fdisk /dev/sda
  The number of cylinders for this disk is set to 19457.
  There is nothing wrong with that, but this is larger than 1024,
  and could in certain setups cause problems with:
  1) software that runs at boot time (e.g., old versions of LILO)
  2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)
  Command (m for help): m #帮助,输入M
  Command action
  a toggle a bootable flag
  b edit bsd disklabel
  c toggle the dos compatibility flag
  d delete a partition 删除一个分区
  l list known partition types
  m print this menu
  n add a new partition 创建一个新的分区
  o create a new empty DOS partition table
  p print the partition table 打印分区表
  q quit without saving changes 退出不保存
  s create a new empty Sun disklabel
  t change a partition\'s system id 改变分区类型
  u change display/entry units 改变显示/输入的单位
  v verify the partition table 验证这个分区表
  w write table to disk and exit 保存退出
  x extra functionality (experts only)
  Command (m for help): d #删除分区
  Partition number (1-8): 2
  Command (m for help): p # 打印分区表
  Disk /dev/sda: 160.0 GB, 160041885696 bytes
  255 heads, 63 sectors/track, 19457 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  Disk identifier: 0x0003ce53
  Device Boot Start End Blocks Id System
  /dev/sda1 * 1 3825 30720000 7 HPFS/NTFS
  /dev/sda3 7650 11474 30720000 7 HPFS/NTFS
  /dev/sda4 11475 19457 64123447+ 5 Extended
  /dev/sda5 11475 14444 23856472+ 7 HPFS/NTFS
  /dev/sda6 19247 19457 1694826 82 Linux swap / Solaris
  /dev/sda7 14445 15660 9767488+ 83 Linux
  /dev/sda8 15661 19246 28804513+ 83 Linux
  Partition table entries are not in disk order
  Command (m for help): n #建立新分区
  Command action
  l logical (5 or over)
  p primary partition (1-4)
  p #主分区
  Selected partition 2
  First cylinder (3825-19457, default 3825): 可以选
  Using default value 3825
  Last cylinder, +cylinders or +size{K,M,G} (3825-7649, default 7649): 输入分区大小 比如100G
  Using default value 7649
  Command (m for help):
lijingsandy
推荐于2017-09-13 · TA获得超过2.4万个赞
知道小有建树答主
回答量:1734
采纳率:93%
帮助的人:183万
展开全部
以RH9为例,上面有只有两个分区 /dev/sda1 和/dev/sda2
#fdisk /dev/sda (注意sda后不要加数字)
command(m for help): m 输入m后,就会看到很多命令
command(m for help): p 输出当前磁盘的状态
command(m for help): q 想要不存储离开吗?按下q,请不要随便按w
新增分区:#fdisk /dev/sda
command(m for help): n 此时系统会提示新增P(主分区)还是E(扩展分区),系统一般是(4个P)+E,而且E分区号必须从5开始
p 这里自行决定是P还是E
Partition number(1-4):3 编号可以随意
First cylinder: 这里按下ENTER就行了
Last cylinder or ..............: +100M
再输入P的时候就能看到新增的分区了
删除分区:
#fdisk /dev/sda
command(m for help): d
选择分区号
记住q---不存储离开 w---存储离开
附上容易混淆的两个命令: df(disk free)---显示磁盘的文件系统与使用情形
du(disk usage)---显示指定的目录或文件所占用的磁盘空间
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
不半凝K
2012-02-13 · 超过12用户采纳过TA的回答
知道答主
回答量:59
采纳率:0%
帮助的人:42.8万
展开全部
你是要删除还是卸载?卸载的话用umount
删除用rm
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
fk931066326
2012-02-16
知道答主
回答量:1
采纳率:0%
帮助的人:1682
展开全部
一楼的你看好了 ,lz问的不是删除文件 是删除分区 rm你想删什么? 可以用系统盘进行分区的修改
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式