为Chrome创建16.04的ramdisk
我想请求帮助,以便为我的chrome浏览器的缓存创建ramdisk。 我知道该怎么做,但我不想让我的系统崩溃,因此我想问更有经验的用户。 🙂
那么,我会做什么:
1)编辑rc.local,然后添加以下内容:
mkdir /tmp/chrome mount -t tmpfs -o size=4096M,mode=0744 tmpfs /tmp/chrome/ chmod 777 /tmp/chrome/ -R
2)然后:
rm -rf ~/.cache/google-chrome ln -s /tmp/chrome/ ~/.cache/google-chrome
这是完成任务的正确方法还是有更简单的解决方案?
谢谢!
解:
1)向fstab添加一个新条目,例如:
# TMP none /tmp tmpfs nodev,nosuid,noatime,mode=1777,size=4096M 0 0
size参数可以根据您的需要而不同。
2)编辑Google Chrode .desktop文件,然后添加到Exec =行的末尾以下内容:
--disk-cache-dir=/tmp/chromecache
3)保存,然后重新启动浏览器。