Unix/Linux dd Usage Examples

List disks in Linux

fdisk -l

After entering fdisk -l you would need to identify your disk(s)

dd how to clone disk to another disk

dd if=/dev/sdc of=Desktop/usb.iso bs=1M conv=noerror,sync

when using dd you have to make sure that you do not mix up the if (input file) and of (output file). “If” will always be the disk that you are copying and “of” is the location or the disk you are copying to

dd how to clone disk to an image

dd if=/dev/sdc of=/dev/sde bs=1M conv=noerror,sync

dd how to show progress

watch -n60 'sudo kill -USR1 $(pgrep ^dd)'

To get the progress of dd we will be using the

  • kill – a built-in command used to terminate processes manually
  • watch – execute a program periodically
    • -n60 (the number 60 in the command above is the seconds that it will refresh, change that to the desired refresh rate )

How to disable /cpanel /whm /webmail links from WHM/cPanel

Some of us look to disable all whm specific urls from our domains, things like cpanel, whm, webmail, webdisk, cpcalendars, cpcontacts.

Disable Automatically adding those urls to your domains

  • Login to your WHM (port 2087)
  • Find Tweak Settings
  • Find Service Subdomains (It’s in the Domains tab, but you can use the find field there, just type in ‘service subdomains’
  • Disable that.
  • You will most probably need to clear the old dns entries which contain these urls from WHM > Edit DNS Zone -> Select your domains, click edit. and clear the fields where it has anything you want to remove. However if you don’t have any custom dns entries you can simply WHM -> Reset a DNS Zone (be cautious there since this will reset the dns zone to defaults, so if you haveĀ  anything custom there it will be cleared.)

Remove cPanel Specific URL for a specific site from cPanel

  • Login to your cPanel page (usually port 2083)
  • Find Zone Editor.
  • Click Manage next to the domain you want to edit.
  • You will find those /cpanel /webmail etc… urls there, Remove them.


How to change PHP version in WHM/cPanel

Change your PHP Version in WHM

  • Login to your WHM using the default port 2087.
  • On the left sidebar locate MultiPHP Manager.
  • You will find a tab that says System PHP Version, under that you will find the selected php version for the whole system.
  • Press the Edit button next to it and choose the PHP version you want.
  • In case you cannot find the PHP version you’re looking for, then you will probably need to install it in the EasyApache page first.
  • In case you want to change the PHP version for a specific site, then you will need to scroll down a little and you will find a table which contains all the domains you have on that server. One of the columns contain a PHP Version list, choose one.

How to Change PHP Version from cPanel

  • Login to you cPanel page (usually at port 2083 or example.com/cpanel).
  • If you are allowed to change the PHP Version from your cPanel then you will find MultiPHP Manager, click that. But if you cannot find that Feature then you will need to contact your server’s administrators to change it for you and to enable that feature.
  • You will find a table with the domains you have on that account in case you have more than one domain/subdomain there, select the ones you want to change.
  • On the top you will find a dropdown list which says PHP Version. Choose one then click Apply.

How to install PHP Imagick Extension on Centos7 with WHM/cPanel and EasyApache4

Imagick is a native php extension to create and modify images using the ImageMagick API.

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.

ImageMagick Studio LLC is a non-profit organization dedicated to making software imaging solutions freely available.

Continue reading