Skip to content

Useful Commands

Mikael Håkansson edited this page Mar 13, 2019 · 4 revisions

Using LESS

On a SSH-session

Look at syslogs

sudo less -S /var/log/syslog.1

Unzip and look at syslog

sudo cat /var/log/syslog.4.gz | gzip -d - | less -S

You can also grep this output by using :

sudo cat /var/log/syslog | grep -v modemManager | less -S

On your local machine

Fetch syslogs to local computer

scp [user]@[hostname]:/var/syslog/syslog.1 /[destination]

For more Less commands

Use this when you need to use the ethernet plug to connect to a meter such as MBus TCP:

nmcli con mod 'Wired connection 1' ipv4.addresses 10.0.0.2/24
nmcli con mod 'Wired connection 1' ipv4.method manual
nmcli con up 'Wired connection 1'

Factory reset

First check which partition is used for bootloader:

admin@9QMW802:~$ efibootmgr
BootCurrent: 000A
Timeout: 1 seconds
BootOrder: 000A,0000,0006,0007
Boot0000* factory_restore
Boot0006* IP4 Realtek PCIe FE Family Controller
Boot0007* IP6 Realtek PCIe FE Family Controller
Boot000A* snappy_ubuntu_core

In the sample above the bootloader is at address 0 (factory_restore)

Next set the factory_restore partition to be used on startup:

sudo efibootmgr -n 0

Last step reboot:

sudo reboot