How Enable Trim on Ssd Linux?
Contents

Trimming your SSD can also be accomplished manually on the command line or in a cron job. As a super user (using su or sudo), run fstrim / -v to accomplish manual trimming, or set up a cron job to run this command for you on a regular basis when your computer is not in use.

Does my SSD support TRIM Linux?

TRIM helps the SSD avoid performance issues by preparing used data blocks for the overwriting process. You can check for TRIM support on your SSD through the Linux command line, as well as enabling it if it is not turned on by default in your system.

How do I enable TRIM in Ubuntu?

In Ubuntu, open a terminal and type:

  1. sudo hdparm -I /dev/sda. …
  2. sudo fstrim -v / …
  3. sudo nano /etc/ …
  4. #!/bin/sh fstrim -v / …
  5. fstrim -v /home >> $LOG. …
  6. #!/bin/sh LOG=/var/log/trim.log echo “*** $(date -R) ***” >> $LOG fstrim -v / >> $LOG fstrim -v /home >> $LOG. …
  7. sudo chmod a+x /etc/
Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest