• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

partprobe Command Examples in Linux

by Deepika

The partprobe command is normally needed only in situations where the partition table has changed and the system needs to be informed of the changes. The most common example is when you use the fdisk command to change a partition on a device that currently has mounted filesystems. The fdisk command attempts to inform the system of changes to the partition table by using a kernel call, which fails because of the “live” filesystem. To overcome this, just execute the partprobe command after exiting the fdisk utility.

These days, systems are pretty good about automatically re-reading the partition table changes of a device, though occasionally you might still need to run partprobe to inform your kernel of any changes manually.

Syntax:

# partprobe [OPTIONS] [DEVICE]

Options:

  • -d: Does not actually inform the operating system.
  • -s: Prints a summary of contents.

partprobe Command Examples

1. Notify the operating system kernel of partition table changes:

# sudo partprobe

2. Notify the kernel of partition table changes and show a summary of devices and their partitions:

# sudo partprobe --summary

3. Show a summary of devices and their partitions but don’t notify the kernel:

# sudo partprobe --summary --dry-run

Note: Although you can check the partitions just created without running the partprobe command first, it is always a good idea to run this command first. Forcing a reread of the partition table ensures that you get the latest information from your system and that no strange errors or outdated information is returned.

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to configure VNC Server on CentOS/RHEL 6
  2. kvm-img: command not found
  3. How to Make User Account Read-Only in CentOS/RHEL 7
  4. Linux OS Service ‘nscd’
  5. How to uninstall chromium-browser from Ubuntu
  6. Linux OS Service ‘irqbalance’
  7. nmtui Command Examples in Linux
  8. CentOS / RHEL : Beginners guide to cron
  9. kscreen-console Command Examples in Linux
  10. hostnamectl: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright