git clone -b maint https://github.com/j6t/kdbg.git kdbg.git && cd kdbg.git
```
Specify the base directory where Kdbg will be installed: replace `install_dir` with a base directory of your choice. If `-DCMAKE_INSTALL_PREFIX` is omitted, it will be installed system-wide (in `/usr/local/`) which I personally don't recommend as it will pollute the system and will be tricky to cleanly remove later.
```
cmake -DCMAKE_INSTALL_PREFIX=install_dir .
```
Install Kdbg. If you want to do a system-wide install, the command below must be run as `root` (since non root users can't write in `/usr/local`).