- 1). Launch the Terminal application by selecting "Applications," "Accessories" and then "Terminal." Depending on your Linux distribution, the menu options to find Terminal may differ slightly.
- 2). Type "sudo fdisk -l" and then press "Enter" to view a list of hard drives associated with your system.
- 3). Note the device name of the JFS hard drive you wish to defragment. For example, if you are defragmenting your primary hard drive, it will probably have a device name of "/dev/sda1."
- 4). Type "defrags device name," replacing "device name" with the name for your JFS hard drive, and then press "Enter." This will run the degragmenting utility for JFS.