Journalctl quick reference:
journalctl -w = tail -f
To filter on a particular service, identifier, or PID:
journalctl -u postfix
journalctl -t ident
journalctl _PID=123
To do a time-based filter:
journalctl --since 1 hour
journalctl --since today
Since last boot (add it -1 for previous day, etc):
journalctl -b
When there is an issue (lockup)
Send commands directly to kernel by holding down Alt+PrtSc, then issue the following commands separately or sequentially R E I S U B (busier backwards)
R = reset the keyboard
E = send a TERM signal to all processes
I = send a KILL to all processes
S = tells kernel to sync
U = unmount all files systems and remount in read-only
B = reboot system
Find location of IP address:
> curl ipinfo.io/xxx.xxx.xxx.xxx
Change Ubuntu server static IP
Old style:
edit /etc/network/interfaces to read something like the following. Be sure to edit the ethernet port name accordingly. After making the change then issue the command:
/etc/init.d/networking restart
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.0.1.13
netmask 255.255.255.0
network 10.0.1.0
broadcast 10.0.1.255
gateway 10.0.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 10.0.1.3 10.0.1.11
dns-search mydomain.com
New way:
Edit the file /etc/netplan/99_config.yaml to read as follows. You could also just edit the 50_cloud_init.yaml file, but otherwise be sure to comment out anything you don't want in there. After making these changes, then issue the command: sudo netplan apply
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
addresses:
- 10.0.1.13/24
routes:
- to: default
via: 10.0.1.254
nameservers:
search: [mydomain.com]
addresses: [10.0.1.3, 10.0.1.11]
Ubuntu Server losing resolve.conf settings after reboot
edit /etc/systemd/resolv.conf.d/dns_servers.conf accordingly
To enable Cyrillic in wine programs:
1) enable Russian in the locale.
Add or uncomment the following line in /etc/locale.gen
ru_RU.UTF8
2) Run locale-gen
3) add the following to the wine command: LANG=ru_RU.UTF-8 wine ........