Session.kill
Kill Session , closes linked windows and detach all clients.
Source and package
-
Description#
Examples#
Kill a session:
>>> session_1 = server.new_session()>>> session_1 in server.sessionsTrue>>> session_1.kill()>>> session_1 not in server.sessionsTrueKill all sessions except the current one:
>>> one_session_to_rule_them_all = server.new_session()>>> other_sessions = server.new_session(... ), server.new_session()>>> all([w in server.sessions for w in other_sessions])True>>> one_session_to_rule_them_all.kill(all_except=True)>>> all([w not in server.sessions for w in other_sessions])True>>> one_session_to_rule_them_all in server.sessionsTrue- Parameters
-
-
all_except(bool | None) # – Kill all sessions in server except this one. -
clear(bool | None) # – Clear alerts (bell, activity, or silence) in all windows. -
group(bool | None) # – Kill all sessions in this session's group (-gflag). Requires tmux 3.7+. If used with tmux < 3.7, a warning is issued and the flag is ignored.
-
tmux command
kill-sessionIn other ports End a session
- PowerShell No source-verified PowerShell equivalent is recorded for this operation.
- Julia No source-verified Julia equivalent is recorded for this operation.
- Ruby
- Lua
- TypeScript
- Rust
- Go
- Java
- C#
- C++
- Swift
- Kotlin No source-verified Kotlin equivalent is recorded for this operation.
- Scala No source-verified Scala equivalent is recorded for this operation.
- F# No source-verified F# equivalent is recorded for this operation.