To install log2ram, run the following commands:
sudo apt update
sudo apt install rsync # RSync is synchronizes files and directories from one location to another
mkdir log2ram
curl -LfSs https://github.com/azlux/log2ram/archive/master.tar.gz | tar -xz --strip-components=1 -C log2ram
sudo ./install.sh
# Reboot
sudo reboot
The config file for Log2RAM is stored at `/etc/log2ram.conf``.
sudo nano /etc/log2ram.conf
After installing and rebooting, use systemctl to check if Log2Ram started successfully:
systemctl status log2ram
This will show a color-coded status (green: active/red: failed), as well as the last few log lines. To show the full log (scrolled to the end), run:
journalctl -u log2ram -e
You can also inspect the mount folder in RAM with:
# df -h | grep log2ram
log2ram 40M 532K 40M 2% /var/log
or also:
# mount | grep log2ram
log2ram on /var/log type tmpfs (rw,nosuid,nodev,noexec,relatime,size=40960k,mode=755)