Command Line Cheatsheet
The everyday commands you just can't live without. Meant to be a quick reference.
Monitoring and Troubleshooting
Systemd
====Common Troubleshooting and Monitoring====
see what's running in systemd
systemctl --type=service --state=running
Edit the service file
sudo nano /etc/systemd/system/ergo-node.service
Reboot and run the service
sudo systemctl daemon-reload
sudo systemctl enable ergo-node.service
sudo systemctl start ergo-node.service
Check high level status
sudo systemctl status ergo-node
Stop the service to edit or troubleshoot
sudo systemctl stop ergo-node.service
See what the service is doing, or "journalling"
journalctl --unit=ergo-node --output=cat -f
Memory & Storage
Check memory limits (like Control Panel) and status
htop
High level memory list
df -h
List block partitions
lsblk
Another list block paritions
sudo blkid
To find uuid upon boot up
ls -l /dev/disk/by-uuid
Remount a drive to be read-write
sudo su
#[type password]
mount -o remount, rw /
Ergo Node Maintenance
Upgrade the node, here shown for version 5.0.14. Update the version!
Copy and paste this into a text file, edit the version, then c & p into terminal
wget https://github.com/ergoplatform/ergo/releases/download/v5.0.14/ergo-5.0.14.jar
Run the node not as a systemd
java -jar -Xmx2g ergo-5.0.14.jar --mainnet -c ergo.conf
Update the rpi for whatever reason
sudo apt update
sudo apt upgrade
reboot the pi
sudo reboot
Networking
To find your public IP
curl icanhazip.com