Wednesday, August 31, 2016

Useful vimrc.local (remember last position of editing for vim)

vim /etc/vim/vimrc.local

" Jump to the last position
if has("autocmd")
autocmd BufReadPost * if line("'\"") > 0 && line ("'\"") <= line("$") | exe "normal! g`\"" | endif
endif

" Enable syntax hightlighting
syntax on

Debug systemd (show errors only) with journalctl

To see what failed on system startup:

root@vm-host1:~# journalctl -b -p 3
-- Logs begin at Wed 2016-08-31 12:28:11 MSK, end at Wed 2016-08-31 12:34:17 MSK. --
Aug 31 12:28:11 vm-host1 kernel: i8042: Can't read CTR while initializing i8042
Aug 31 12:28:11 vm-host1 kernel: sd 6:0:0:0: [sdd] No Caching mode page found
Aug 31 12:28:11 vm-host1 kernel: sd 6:0:0:0: [sdd] Assuming drive cache: write through
Aug 31 12:28:11 vm-host1 systemd-sysv-generator[306]: Ignoring creation of an alias umountiscsi.service for itself
Aug 31 12:28:12 vm-host1 kernel: Error: Driver 'pcspkr' is already registered, aborting...
Aug 31 12:28:24 vm-host1 iscsid[994]: iSCSI daemon with pid=995 started!