The ClickHouse CLI (clickhousectl) helps you install and manage local ClickHouse
versions, launch servers, and run queries.
Install the ClickHouse CLI
curl https://clickhouse.com/cli | shA chctl alias is also created automatically for convenience.
Install ClickHouse
Install the latest version of ClickHouse and make it your default:
clickhousectl local use latestlocal use installs the version if it isn’t already present, sets it as your
default, and creates a clickhouse symlink in ~/.local/bin (on your PATH)
so you can invoke the clickhouse binary directly. Any later step in these docs
that runs a clickhouse command then works as-is.
You can also select a specific version:
clickhousectl local use 26.5 # Latest 26.5.x.x
clickhousectl local use 26.5.2.39 # Exact versionStart clickhouse-server
clickhousectl local server startThe server runs in the background. To verify it’s running:
clickhousectl local server listStart clickhouse-client
clickhousectl local clientYou will see something like this:
ClickHouse client version 24.5.1.117 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 24.5.1.
local-host :)You’re now ready to start sending SQL commands to ClickHouse!