Java has to be installed as a prerequisite.
Download the SQLcl file. SQLcl can be downloaded from this link https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/
In linux Issue below command
$ wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip

sudo mv sqlcl-latest.zip /opt
sudo apt install unzip
cd /opt
mkdir sqlcl
mv sqlcl-latest.zip sqlcl
chmod 777 -R sqlcl
Add SQLcl bin directory to Linux PATH variable. For Debian based distro we will add in .profile file. This will be for User wide access. For System wide access go to /etc/profile.d and create one .sh file as root user and then add the Linux PATH variable with SQLcl bin Directory
Use any text Editor to edit .profile.d. Im here using Emacs. .profile file will be in home directory
emacs .profile
Add your sqlcl bin path to .profile file

Once the bin directory is added source your profile to load the changes
source .profile

Now type sql in your command line and if the below opens sqlcl is working.
