linux logoff command code example Example 1: ubuntu logout gnome-session-quit Example 2: force-logout user linux pkill -KILL -u {username}