I am about to buy an SSD 840 pro from Samsung and I read I needed to do some configuration on ubuntu in order to not reduce its life, and get the optimal performances. What I wanna know is what I need to do, step by step and simple to use my SSD correctly on ubuntu, which i will install on it. Thank you.


What you want to know is How to enable TRIM?

Which is fairly easy, simply open your terminal, open the fstab file and add the discard option to the SSD UUID that corresponds to your Samsung SSD. Basically open the terminal and:


which should show you all HDD/SSD so you can see which one is which:

enter image description here

Here my SSD is sdb which is the one that has the root filesystem with it (the little / you see there at the end of the line that starts with sdb1). I then:

sudo nano /etc/fstab

enter image description here

And look for the root filesystem (The / "slash") marked with the Red circle. I then add the discard option (marked with the blue circle) to the several options shown there. In my case it reads discard,noatime,errors.... since I only needed to add the discard and a comma. Note that the discard is AFTER the ext4, this is because each section or columns is for an specific part of fstab. The 3rd column is for the filesystem type, which is ext4 in this case. The 4th column is for the options, which is were discard is.

Now save the file by pressing CTRL+X which will show you a message below saying if you want to save the file, press Y and you are done. Now reboot the computer and you are ready.

Some benchmarks for that particular SSD will help you enjoy that fast drive:

enter image description here

enter image description here

NOTE: Gnome Disk has a problem with this SSD when doing a benchmark with Write enable. It is a bug that they are working to fix.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.