To prevent my external drive from sleeping I need to use this command:

 sudo sdparm --clear=STANDBY /dev/sdb2

Do I have to use it every time I boot? Or just one time and I am set forever?

  • Did you check /etc/hdparm.conf (that's on Debian, or whereever your distro has this file) for entries?
    – dirkt
    Commented Jan 25, 2017 at 9:31

1 Answer 1


I think that will work if you also add a --save tag after sdparm, but you might want to check the file after reboot to make sure.


sudo sdparm --save --clear=STANDBY /dev/sdb2

Here is the snippet from an sdparm man page:

-S, --save

When a mode page is being modified (by using the --clear=STR and/or --set=STR options) then the default action is to modify only the current values mode page. When this option is given then the corresponding value(s) in the saved values mode page is also changed. The next time the device is power cycled (or reset) the saved values mode page becomes (i.e. is copied to) the current values mode page.

See NOTES section below.

-Courtesy https://linux.die.net/man/8/sdparm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .