Monitor and display kernel messages as they occur in real-time
dmesg -w
Update the default application for opening directories
xdg-mime default pcmanfm.desktop inode/directory
Redirect output to a file and stdout
command [arguments...] 2>&1 | tee log.txt