Table of Contents
In this article, we will go through 6 Easy Steps to Install LastPass CLI on Ubuntu 20.04. LastPass is a free and open source utility to store secret password in an external vault. It provides an ability to Developers and programmers to integrate and use it from a shell or bash script. It also provides better security and convenience to add, modify and update secret entries in the vault. We will see the steps to install this utility on Ubuntu 20.04 server in great detail. More on lpass.
Steps to Install LastPass CLI on Ubuntu 20.04
Also Read: 6 Popular Steps to Install Stacer Monitoring Tool on Ubuntu 20.04
Step 1: Prerequisites
a) You should have a running Ubuntu 20.04
Server.
b) You should have sudo or root access to run privileged commands.
c) You should have apt
utility installed in your Server.
Step 2: Update Your Server
It is always recommended to update all your installed server packages first before installing any package. This will prevent any breakdown in system. You can update it by simply using apt update
command as shown below. This will pull and install all the latest updates from all the enabled Ubuntu Repositories.
root@localhost:~# apt update Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 https://packages.microsoft.com/repos/edge stable InRelease Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Ign:6 http://ppa.launchpad.net/oguzhaninan/stacer/ubuntu focal InRelease Get:7 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease [17.5 kB]
Step 3: Install LastPass CLI
In the next step, you can install LastPass CLI package by using apt install lastpass-cli
command as shown below. This will download and install the utility along with its dependencies from Ubuntu Repo.
NOTE:
root
user to run all the below commands. You can use any user with sudo
access to run all these commands. For more information Please check Step by Step: How to Add User to Sudoers to provide sudo
access to the User.root@localhost:~# apt install lastpass-cli Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: fonts-inter libdouble-conversion3 libpcre2-16-0 libqt5charts5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libxcb-xinerama0 libxcb-xinput0 qt5-gtk-platformtheme qttranslations5-l10n Use 'apt autoremove' to remove them. The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu libbinutils libctf-nobfd0 libctf0 Suggested packages: binutils-doc xclip | xsel The following NEW packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu lastpass-cli libbinutils libctf-nobfd0 libctf0 0 upgraded, 7 newly installed, 0 to remove and 184 not upgraded. Need to get 2,477 kB of archives. After this operation, 14.0 MB of additional disk space will be used. Do you want to continue? [Y/n] Y
Step 4: Check lpass version
After successful installation, you can check LassPass CLI utility version by using lpass --version
command as shown below.
root@localhost:~# lpass --version LastPass CLI v1.3.3.GIT
Step 5: Using lpass command
Now that we have verified the installation of LastPass CLI utility, let's use it to login to LastPass using our valid email ID. You need to use lpass login <email_id>
syntax to login to LastPass.
root@localhost:~# lpass login user@example.com
Step 6: Uninstall LastPass CLI utility
Once you are done with LastPass CLI utility, you can simply remove it by using apt remove lastpass-cli
command as shown below.
root@localhost:~# apt remove lastpass-cli Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: fonts-inter libdouble-conversion3 libpcre2-16-0 libqt5charts5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libxcb-xinerama0 libxcb-xinput0 qt5-gtk-platformtheme qttranslations5-l10n Use 'apt autoremove' to remove them. The following packages will be REMOVED: lastpass-cli 0 upgraded, 0 newly installed, 1 to remove and 184 not upgraded. After this operation, 243 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 189080 files and directories currently installed.) Removing lastpass-cli (1.3.3-3) ... Processing triggers for man-db (2.9.1-1) ...