How to install Kcli on Ubuntu 17.04

How to install Kcli on Ubuntu 17.04

Kernel Command Line Interface or kcli is a standalone tool that provides a command line environment that runs in the kernel and can be extended with custom commands registered by other kernel modules. It is directly derived from libcli and the regular expression support is directly derived from diet libc. This tutorial covers the installation procedure of kcli on Ubuntu 17.04.

Installation procedure

To start with the installation procedure, add the repo by executing the following command.

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.
+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this a nd related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
  runtime licensing and possible legal consequences.
* Some packages provided with their dependencies while some might require additional
  Ubuntu repositories and external PPAs. Below is the list of
.
.
.
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox ' /tmp/tmp58gcy2yp/pubring.gpg'  created
gpg: /tmp/tmp58gcy2yp/trustdb.gpg: trustdb created
gpg: key E61380B28313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:imported: 1
OK

The repositories are added to the target system. Update the repo by running the apt-get update command.

root@linuxhelp1:~# apt-get update
Get:1 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty InRelease [15.4 kB]
Hit:2 http://in.archive.ubuntu.com/ubuntu zesty InRelease
Hit:3 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Get:6 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main amd64 Packages [1,100 B]
Get:7 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main i386 Packages [1,108 B]
Get:8 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main Translation-en [1,288 B]
Fetched 18.9 kB in 1s (12.3 kB/s)
Reading package lists... Done

The target system is updated with the latest repositories. Install the kpcli package by executing the following command and press y to continue with the installation process.

root@linuxhelp1:~# apt-get install kpcli -y  
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcapture-tiny-perl libclipboard-perl libcrypt-rijndael-perl libdata-password-perl libfile-keepass-perl
libmath-random-isaac-perl libmath-random-isaac-xs-perl libsort-naturally-perl libterm-readkey-perl libterm-readline-gnu-perl
libterm-shellui-perl xclip
The following NEW packages will be installed:
kpcli libcapture-tiny-perl libclipboard-perl libcrypt-rijndael-perl libdata-password-perl libfile-keepass-perl
libmath-random-isaac-perl libmath-random-isaac-xs-perl libsort-naturally-perl libterm-readkey-perl libterm-readline-gnu-perl
libterm-shellui-perl xclip
0 upgraded, 13 newly installed, 0 to remove and 79 not upgraded.
Need to get 388 kB of archives.
After this operation, 1,400 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libcrypt-rijndael-perl amd64 1.13-1build2 [17.1 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libsort-naturally-perl all 1.03-1 [13.7 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libterm-readkey-perl amd64 2.37-1 [24.4 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libterm-shellui-perl all 0.92-2 [44.3 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libfile-keepass-perl all 2.03-1 [36.7 kB]
.
.
.
Setting up libcapture-tiny-perl (0.44-1) ...
Setting up libmath-random-isaac-perl (1.003-1) ...
Setting up libcrypt-rijndael-perl (1.13-1build2) ...
Setting up libdata-password-perl (1.12-1) ...
Setting up libterm-readkey-perl (2.37-1) ...
Setting up libsort-naturally-perl (1.03-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libfile-keepass-perl (2.03-1) ...
Setting up libterm-readline-gnu-perl (1.35-1) ...
Setting up libclipboard-perl (0.13-1) ...
Setting up kpcli (3.1-3) ...

For using the package, type the following command and a list of options that can be used with the kpcli is shown.

root@linuxhelp1:~# kpcli --help
Usage: kpcli [--kdb=< file.kdb> ] [--key=< file.key> ]
--kdbOptional KeePass database file to open (must exist).
--keyOptional KeePass key file (must exist).
--pwfilesRead master password from file instead of console.
--histfileSpecify your history file (or perhaps /dev/null).
--readonlyRun in read-only mode  no changes will be allowed.
--timeout=iLock interface after i seconds of inactivity.
--commandRun single command and exit (no interactive session).
--no-recycleDon' t store entry changes in /Backup or " /Recycle Bin" .
--helpThis message.
Run kpcli with no options and type ' help'  at its command prompt to learn

To remove the package, execute the following command and press y to continue with the uninstallation process.

root@linuxhelp1:~# apt-get remove kpcli -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcapture-tiny-perl libclipboard-perl libcrypt-rijndael-perl libdata-password-perl libfile-keepass-perl
libmath-random-isaac-perl libmath-random-isaac-xs-perl libsort-naturally-perl libterm-readkey-perl libterm-shellui-perl xclip
Use ' apt autoremove'  to remove them.
The following packages will be REMOVED:
kpcli
0 upgraded, 0 newly installed, 1 to remove and 79 not upgraded.
After this operation, 223 kB disk space will be freed.
(Reading database ... 169018 files and directories currently installed.)
Removing kpcli (3.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...

Wasn' t that an easy installation process? Kpcli modifies no kconfig an makefile modifications.

FAQ
Q
how to check the available options in KCli?
A
list of options that can be used with the kpcli is shown
# kpcli --help
Q
which command to remove the Kcli in ubuntu?
A
remove the Kcli package, execute the following command
# apt-get remove kpcli -y
Q
what is the use of installing Kcli in ubuntu?
A
Kernel Command Line Interface or kcli is a standalone tool that provides a command line environment that runs in the kernel and can be extended with custom commands registered by other kernel modules. It is directly derived from libcli and the regular expression support is directly derived from diet libc.
Q
Whether is there any source package available for Kcli?
A
refer the link as follow source for Kcli package

"http://sourceforge.net/projects/kpcli/".
Q
is Kcli available for MAC?
A
no. Kcli is not available for MAC.