{{{ #!div class="compact" style="border: 1pt dotted; margin: 1em" Jump to: | [wiki:Download] | [wiki:TocDoc Documentation] | [wiki:FAQ] | [wiki:Help] | [wiki:TocSupport Device Support] | [wiki:WikiStart#ContributetoSmartmontools Contribute] | [wiki:Links] | }}} = Smartmontools Download and Installation = [[PageOutline(2-3,Table of Contents, inline)]] ---- Smartmontools 7.4 was released 2023-08-01, see [source:/tags/RELEASE_7_4/smartmontools/NEWS NEWS], [source:/tags/RELEASE_7_4/smartmontools/ChangeLog ChangeLog] and [/query?milestone=Release+7.4 tickets] for details. Release files are signed with OpenPGP/GPG key ID `FF3AEFF5`, fingerprint: `0C95 77FD 2C4C FCB4 B9A5 9964 0A30 812E FF3A EFF5`.[[BR]] The public key block is available here: [source:/trunk/www/SmartmontoolsSigningKey_2021.txt Trac Browser], [https://sourceforge.net/p/smartmontools/code/HEAD/tree/trunk/www/SmartmontoolsSigningKey_2021.txt SVN Repository], [https://keyserver.ubuntu.com/pks/lookup?search=0xFF3AEFF5&fingerprint=on&op=index Key Servers] (see the [wiki:FAQ#check-signature FAQ] for older keys). ---- After installation or booting from a [wiki:LiveCDs Live-CD], you can read smartmontools man pages and try out the commands: {{{ man smartd.conf man smartctl man smartd sudo /usr/sbin/smartctl -s on -o on -S on /dev/sda sudo /usr/sbin/smartctl -x /dev/sda }}} Note that the default location for the manual pages are {{{/usr/share/man/man5}}} and {{{/usr/share/man/man8}}}. If '{{{man}}}' doesn't find them, then you may need to add {{{/usr/share/man}}} to your {{{MANPATH}}} environment variable. The [#InstalltheWindowspackage Windows package] provides preformatted man pages in {{{*.html}}} and {{{*.pdf}}} format. ---- == Install precompiled package == Precompiled packages are available for many distributions, see the [wiki:Packages] page or [https://repology.org/project/smartmontools/versions Repology.org]. ---- === Install the Windows package === Download and run the latest smartmontools [https://nsis.sourceforge.io/Main_Page NSIS]-installer ({{{*.win32-setup.exe}}}) from [https://sourceforge.net/projects/smartmontools/files/ here]. More recent Windows test releases build from SVN snapshots are available [https://builds.smartmontools.org/ here]. The default install type "Full" creates start menu shortcuts including an uninstaller, and adds the install directory to the PATH variable. The install type "Extract files only" is useful to unpack a "portable" version without affecting the Windows registry. The files can also be unpacked by [https://www.7-zip.org/ 7-Zip] which is also available for [https://repology.org/project/7zip/versions Linux distributions]. Starting with smartmontools 5.43, the (32-bit) installer provides 32-bit and 64-bit executables. The 32-bit version of smartmontools usually works also on 64-bit versions of Windows except if the 32-bit subsystem is unavailable (e.g. 64-bit WinPE). Virus scanners occasionally produce false positive virus reports for smartmontools executables or [https://nsis.sourceforge.io/NSIS_False_Positives NSIS Installers]. If this is the case on your system, please send a report to the [https://listi.jpberlin.de/mailman/listinfo/smartmontools-support smartmontools-support mailing list]. This is not needed if the detection is also reported by [https://www.virustotal.com/ VirusTotal]. The [https://chocolatey.org/ Chocolatey package manager] provides install scripts for [https://chocolatey.org/packages/smartmontools smartmontools] and [https://chocolatey.org/packages/gsmartcontrol GSmartControl]. ---- === Install the OSX/Darwin package === Download and run the latest smartmontools dmg image from [https://sourceforge.net/projects/smartmontools/files/ here]. More recent OS X test releases build from the SVN snapshots are available [https://builds.smartmontools.org/ here]. Package provides Mach-O universal binary with 2 architectures (i386 and x86_64) and should work on any Intel based Mac. ---- == Install from the source tarball == Download the latest source tarball from [https://sourceforge.net/projects/smartmontools/files/ here]. More recent test tarballs build from SVN snapshots are available [https://builds.smartmontools.org/ here]. Uncompress the tarball: {{{ tar zxvf smartmontools-6.5.tar.gz }}} The previous step created a directory called {{{smartmontools-6.3}}} containing the code. Go to that directory, build, and install: {{{ cd smartmontools-6.5 ./configure make sudo make install }}} These optional arguments of {{{./configure}}} are fully explained in the [source:/trunk/smartmontools/INSTALL INSTALL] file. The most important one is {{{--prefix}}} to change the default installation directories. If you don't pass any arguments to {{{./configure}}} all files will reside under {{{/usr/local}}} to not interfere with files from your distribution. To compile from another directory (avoids overwriting virgin files from the smartmontools package) replace {{{./configure [options]}}} by: {{{ mkdir objdir cd objdir ../configure [options] }}} To install to another destination (useful for testing and to avoid overwriting an existing smartmontools installation) replace {{{make install}}} by: {{{ make DESTDIR=/home/myself/smartmontools-test install }}} Use a full path: {{{~/smartmontools-test}}} would work but {{{./smartmontools-test}}} won't. The smartmontools binaries for Windows can be build from the source tarball (or from SVN) using the [https://www.mingw-w64.org/ MinGW-w64] runtime. Build environments may be [https://cygwin.com/ Cygwin] or [https://www.msys2.org/ MSYS2], cross-compilation under Linux is also supported. Extra {{{./configure}}} arguments {{{--host=...}}} and {{{--build=...}}} may be required. The {{{make install}}} command does not work for Windows. See [source:/trunk/smartmontools/INSTALL INSTALL] file for details. ---- == Install latest unreleased code from SVN repository == We have also [https://builds.smartmontools.org/ CI builds]. '''Sourceforge moved our repository to a new location: [https://svn.code.sf.net/p/smartmontools/code/]. Use the [/browser/ trac] or [https://sourceforge.net/p/smartmontools/code/HEAD/tree/ sourceforge] viewer to browse it.''' For those, who don't already have a Subversion client installed, here is a [https://subversion.apache.org/packages.html list of SVN Packages] and a [https://en.wikipedia.org/wiki/Comparison_of_Subversion_clients comparison of SVN clients] for different operating systems and in all colors and flavours. (Stand-alone clients, Desktop-integrated clients, IDE plug-in clients, ..) All you need to do to get the latest development code is (but note that the development code may be unstable, and that the documentation and code may be inconsistent): {{{ svn co https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools }}} This will create a subdirectory called {{{smartmontools/}}} containing the code. Go to that directory, build, and install: {{{ cd smartmontools ./autogen.sh ./configure make sudo make install }}} See notes under [#Installfromthesourcetarball Install from source tarball] for different options to {{{./configure}}} and other useful remarks. To update your sources from trunk (development version): {{{ cd smartmontools svn update }}} One of the really cool things about version control systems is that you can get ''any'' version of the code you want, from the first release up the the most current development version. And it's trivial, because each release is __tagged__ with a name. Look at the [https://sourceforge.net/p/smartmontools/code/HEAD/tree/tags/ tags in our SVN repository] to see what the different names are. E.g. run the following command to fetch the RELEASE_5_38 release: {{{ svn co https://svn.code.sf.net/p/smartmontools/code/tags/RELEASE_5_38/sm5 smartmontools }}} Note that the directory with the smartmontools sourcefiles is named '''{{{sm5}}}''' in releases <= 5.38. The rest of the build procedure is the same like described above. ---- == Update the drive database == The drive database file {{{drivedb.h}}} can be updated separately with the following command: {{{ sudo /usr/sbin/update-smart-drivedb }}} This command uses [https://curl.haxx.se/ curl], [https://www.gnu.org/software/wget/ wget] or [https://lynx.invisible-island.net/ lynx] for download. A proxy server can be specified by the environment variable `https_proxy` (lower case only), see the man pages of the tools for details. The downloaded file is verified with OpenPGP/GPG key ID `721042C5` (release 6.6: `DFD22559`). The public key block is [source:trunk/smartmontools/update-smart-drivedb.in?rev=5597#L400 included in the script]. It is also available at [https://keyserver.ubuntu.com/pks/lookup?search=0x721042C5&fingerprint=on&op=vindex Key Servers] ([https://keyserver.ubuntu.com/pks/lookup?search=0xDFD22559&fingerprint=on&op=vindex release 6.6]) but there is no need to import it into a local keyring. The Windows package provides {{{update-smart-drivedb.ps1}}} since 7.3. It reads the proxy configuration from system settings. Older releases provide {{{update-smart-drivedb.exe}}}. The {{{drivedb.h}}} file can be viewed or downloaded ([[Image(/chrome/common/download.png)]]) using the Trac browser: [source:/branches/RELEASE_6_5_DRIVEDB/smartmontools/drivedb.h 6.5], [source:/branches/RELEASE_6_6_DRIVEDB/smartmontools/drivedb.h 6.6], [source:/branches/RELEASE_7_0_DRIVEDB/smartmontools/drivedb.h 7.0-7.1], [source:/branches/RELEASE_7_2_DRIVEDB/smartmontools/drivedb.h 7.2], [source:/branches/RELEASE_7_3_DRIVEDB/smartmontools/drivedb.h 7.3-7.4], [source:/trunk/smartmontools/drivedb.h trunk].[[BR]] The following branches are no longer maintained: [source:/branches/RELEASE_5_39_DRIVEDB/smartmontools/drivedb.h 5.39], [source:/branches/RELEASE_5_40_DRIVEDB/smartmontools/drivedb.h 5.40], [source:/branches/RELEASE_5_41_DRIVEDB/smartmontools/drivedb.h 5.41], [source:/branches/RELEASE_5_42_DRIVEDB/smartmontools/drivedb.h 5.42], [source:/branches/RELEASE_5_43_DRIVEDB/smartmontools/drivedb.h 5.43], [source:/branches/RELEASE_6_0_DRIVEDB/smartmontools/drivedb.h 6.0], [source:/branches/RELEASE_6_1_DRIVEDB/smartmontools/drivedb.h 6.1], [source:/branches/RELEASE_6_2_DRIVEDB/smartmontools/drivedb.h 6.2], [source:/branches/RELEASE_6_3_DRIVEDB/smartmontools/drivedb.h 6.3], [source:/branches/RELEASE_6_4_DRIVEDB/smartmontools/drivedb.h 6.4]. ---- == Run smartmontools from Live-system == If you have a system that is showing signs of disk trouble (for example, it's unbootable and the console is full of disk error messages) it can be handy to have a version of smartmontools that can be run off of a bootable medium to examine the disk's SMART data and run self-tests. This is also useful if you want to run Captive Self-Tests (the '''{{{-C}}}''' option of {{{smartctl}}} ) on disks that can not easily be unmounted, such as those hosting the Operating System files. Or you can use this to run {{{smartctl}}} on computers that don't use Linux as the day-to-day operating system. Please see the list of [wiki:LiveCDs Live CDs/DVDs containing smartmontools]. ---- '''License'''[[BR]] All content in this wiki is published under [https://www.gnu.org/licenses/gpl-2.0.html#SEC1 GNU GPL].