LinuxCommandLibrary

konsole

Open a terminal emulator window

TLDR

Open the terminal in a specific directory

$ konsole --workdir [path/to/directory]
copy

[e]xecute a specific command and don't close the window after it exits
$ konsole --noclose -e "[command]"
copy

Open a new tab
$ konsole --new-tab
copy

Open the terminal in the background and bring to the front when is pressed
$ konsole --background-mode
copy

SYNOPSIS

konsole [OPTIONS] [COMMAND...]
konsole [OPTIONS] --profile <profile_name> [--new-tab] [--workdir <directory>] [-e <command> [arguments...]]

PARAMETERS

-p, --profile <profile_name>
    Starts Konsole using the specified profile. Profiles define settings like font, colors, initial command, etc.

--new-tab
    Opens a new tab in an existing Konsole window, if one is running. Otherwise, opens a new window.

--tabs-from-file <file>
    Opens multiple tabs, each configured according to lines in the specified file. Useful for restoring sessions.

--workdir <directory>
    Sets the initial working directory for the Konsole session.

-e, --exec <command> [arguments...]
    Executes the specified command instead of the default shell. All subsequent arguments are passed to the command.

-H, --hold
    Keeps the Konsole window open after the executed command finishes.

--separate
    Always opens a new Konsole window, even if an instance is already running.

--display <display>
    Specifies the X display to use for Konsole.

--geometry <geometry>
    Sets the initial size and position of the Konsole window (e.g., '80x24+100+100').

--hide-menubar
    Starts Konsole with the menu bar hidden.

--list-profiles
    Prints a list of all available Konsole profiles to standard output and exits.

DESCRIPTION

Konsole is the default terminal emulator for the KDE Plasma Desktop Environment. It offers a rich set of features beyond a basic command-line interface, providing a highly customizable and user-friendly experience. Key functionalities include support for multiple tabs, split views within a single window, and a comprehensive profile management system that allows users to configure distinct settings for different tasks (e.g., specific fonts, color schemes, shell commands, and working directories). Konsole integrates seamlessly with other KDE applications, such as Dolphin (the file manager), allowing users to open a terminal directly in the current directory. It also supports D-Bus for advanced scripting and automation, as well as a wide range of keyboard shortcuts and visual customization options, making it a powerful tool for developers, system administrators, and regular users alike.

CAVEATS

Konsole is tightly integrated with the KDE Plasma Desktop. While it can be used on other desktop environments, some advanced features or integrations (like D-Bus scripting or opening from Dolphin) might require KDE libraries or a running KDE session for full functionality. Heavy usage of split views or many tabs might consume more resources than lighter terminal emulators.

PROFILE MANAGEMENT

Konsole's profile system is highly flexible. Users can create, edit, and switch between profiles with different default commands, color schemes, font settings, scrollback limits, and keyboard shortcuts, allowing for quick adaptation to various tasks or environments without manual re-configuration.

D-BUS INTERFACE

Konsole exposes a D-Bus interface, enabling external applications or scripts to control its behavior programmatically. This allows for advanced automation, such as opening new tabs with specific commands, changing profiles, or manipulating the Konsole window from other applications.

SPLIT VIEWS

A unique feature of Konsole is its ability to split a single tab horizontally or vertically, creating multiple terminal panes within the same tab. This is extremely useful for tasks requiring simultaneous viewing of multiple outputs or interacting with several command lines at once.

HISTORY

Konsole has been an integral part of the KDE Desktop Environment since its early days (around KDE 2.x, released in 2000). It was designed from the ground up to be a modern, feature-rich terminal emulator that leverages the KDE framework. Over the years, it has continuously evolved, adding features like tabbed browsing, split views, extensive profile management, and D-Bus scripting capabilities. It remains the default and most popular terminal emulator for KDE Plasma users, known for its robustness and deep integration with the desktop.

SEE ALSO

xterm(1), gnome-terminal(1), alacritty(1), kitty(1), bash(1), zsh(1), fish(1)

Copied to clipboard