LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kioclient

KDE command-line client for KIO network-transparent file operations

TLDR

Open a URL with whichever KDE application handles it
$ kioclient exec [https://example.com]
copy
Open a local file with its default application
$ kioclient exec [path/to/file.pdf]
copy
Print a remote file to standard output
$ kioclient cat [sftp://user@host/path/to/file]
copy
List a remote directory
$ kioclient ls [smb://server/share]
copy
Copy across protocols, from a remote share to a local path
$ kioclient copy [sftp://host/path/to/file] [path/to/local]
copy
Copy several sources into one directory
$ kioclient cp [path/to/file1] [path/to/file2] [path/to/destination]
copy
Move a file
$ kioclient move [path/to/source] [path/to/destination]
copy
Delete a file through KIO
$ kioclient remove [sftp://host/path/to/file]
copy
Create a directory on a remote share
$ kioclient mkdir [sftp://host/path/to/dir]
copy
Download a remote file, asking where to save it
$ kioclient download [sftp://host/path/to/file]
copy
Open KDE's file properties dialog
$ kioclient openProperties [path/to/file]
copy

SYNOPSIS

kioclient command [arguments] [options]kioclient5 command [arguments] [options]kioclient6 command [arguments] [options]

DESCRIPTION

kioclient is a thin command-line front-end to the KIO framework that powers file access throughout KDE (Dolphin, Konqueror, Gwenview, and many others). It lets shell scripts and users invoke the same network-transparent virtual filesystem that KDE applications use, treating remote shares, archives, and even the trash bin as if they were local paths.Any URL scheme implemented by an installed KIO worker can be used: file: for local paths, sftp: and fish: for SSH-based access, smb: for Windows shares, ftp: and webdav: for legacy network shares, trash: for the recycle bin, tar: and zip: for archive contents, and protocol-specific schemes such as man:, info:, mtp:, gdrive:, and many more. The available list depends on which kio-extras plugins are installed.In addition to plain file operations (cp, mv, rm, mkdir, ls, cat, download), kioclient can launch the default GUI handler for a resource through exec, which is the easiest way to script "open this URL in the right KDE app". The openProperties command displays the same Properties dialog that Dolphin shows on right-click.On modern distributions, kioclient is split into a Qt5 binary (kioclient5) and a Qt6 binary (kioclient6). The unversioned kioclient symlink, where present, points at whichever build the distribution treats as default.

PARAMETERS

--commands

Print the list of available commands.
--overwrite
Overwrite destination files when copying or moving.
--interactive
Use interactive dialogs (default for GUI usage).
--noninteractive
Suppress dialogs; useful for scripts.
--platform name
Choose the Qt Platform Abstraction plugin (e.g. xcb, wayland, offscreen).
--help
Print help and exit.
--version
Print the program version.

COMMANDS

exec url [mimetype]

Open url with the default handler registered for its MIME type. If mimetype is given, that handler is used instead of the detected type.
cat url
Write the contents of the file at url to standard output.
ls url
List entries in the directory at url.
cp source ... destination
Copy one or more sources to destination via KIO. Sources and destination may be any supported URL scheme.
mv source ... destination
Move sources to destination via KIO.
rm url
Delete the file or directory at url via KIO.
mkdir url
Create a new directory at url.
download [url]
Copy url to a local file selected through a save dialog. If no URL is given, a file picker opens.
openProperties url
Display the KDE Properties dialog for url.

INSTALL

sudo apt install kde-cli-tools
copy
sudo dnf install kde-cli-tools
copy
sudo pacman -S kde-cli-tools
copy
sudo apk add kde-cli-tools
copy

CAVEATS

kioclient requires a running D-Bus session and the appropriate Qt platform plugin. On a headless server, set QTQPAPLATFORM=offscreen or pass --platform offscreen, otherwise the command may fail to connect to the display.Authentication for remote protocols is delegated to kwalletd / kwallet6. The first time a credential is needed, a graphical password dialog is shown; in non-interactive shells the operation will hang or fail unless the credential is already cached.The set of usable URL schemes depends on installed KIO worker packages. A scheme that works in Dolphin but not from a fresh kioclient invocation usually means the worker plugin is installed but its D-Bus session has not been started.

HISTORY

kioclient has shipped with KDE since the KDE 3 era as a way for shell scripts and other applications to drive the KIO framework that Konqueror introduced. It was rewritten for KDE 4 alongside KIO itself and renamed to kioclient4 to coexist with the KDE 3 version. The Qt5-based kioclient5 appeared with KDE Frameworks 5 in 2014, and kioclient6 followed the KDE Frameworks 6 release in 2024.

SEE ALSO

dolphin(1), kdialog(1), xdg-open(1), gio(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid