[ @user @console @login ]
Довольно просто разлогиниться из пользовательской сесси из консоли
exit
Но в окне Konsole та же команда просто закрывает окно терминала. Чтобы полностью закрыть текущую сессию надо использовать systemd:
loginctl terminate-user astenix
Возможности loginctl
Показать текущие пользовательские сессии:
loginctl
или же
loginctl list-sessions
Другие команды:
Here are the most used commands which I will describe in this article:
- list-sessions - shows a list of sessions;
- session-status [id> - shows the session state, login date and time, and a list of processes of the session;
- show-session [id> - shows properties of the session;
- activate [id> - switches to the specified session;
- lock-session [id> - locks screen for the specified session;
- unlock-session [id> - unlocks screen for the specified session;
- kill-session [id> - terminates the session or sends the specified signal to all session's processes;
- terminate-session [id> - terminates session;
- list-users - shows user names who are currently logged in;
- user-status [id> - works as well as session-status, prints login date, state, and active services with their processes as a tree;
- show-user [id> - prints information about the user and his current session, without a list of services;
- terminate-user [id> - terminates all user sessions and their processes;
- kill-user [id> - sends a signal to all processes of a user. SIGTERM will be sent by default;
- list-seats - shows a list of available seats;
- seat-status [id> - shows all processes that are related to the seat;
- show-seat [id> - prints settings for the seat;
- terminate-seat [id> - terminates all processes that are related to the seat.