How to Install Clink on Debian Latest

Clink is a powerful tool developed for managing Windows command-line applications. It enhances command-line operations by providing enhanced features such as a powerful line editing, history searching and much more. In this guide, we will see how to install Clink on a Debian latest operating system.

Prerequisites

To install Clink, you need to have the following prerequisites:

Step 1: Install Required Packages

  1. Login to your Debian system as a user with sudo access.
  2. Open a terminal window.
  3. Execute the following command to update the system package database:
$ sudo apt-get update
  1. Install the required packages for building and installing Clink:
$ sudo apt-get install -y git make gcc libc6-dev libncurses-dev

Step 2: Install Clink

  1. Open a terminal window.
  2. Execute the following command to clone the Clink git repository:
$ git clone https://github.com/mridgers/clink.git
  1. Change into the newly created clink directory:
$ cd clink
  1. Build and install Clink:
$ make install PREFIX=/usr/local
  1. Verify that Clink is installed successfully by executing the following command:
$ clink

You should see the Clink prompt indicating that it is installed successfully.

Step 3: Configure Clink

By default, Clink uses the cmd.exe shell to execute commands. However, you can configure Clink to use any other shell such as PowerShell, Git Bash, etc. To configure Clink, perform the following steps:

  1. Open a terminal window.
  2. Create a clink directory in your home directory:
$ mkdir ~/.clink
  1. Create a userprofile.lua file in the ~/.clink directory using your favorite text editor:
$ nano ~/.clink/userprofile.lua
  1. Add the following lines to the userprofile.lua file to configure Clink to use powershell.exe as the shell:
if (clink.force_alias and not clink.arg[-1]:find("/") and not clink.arg[-1]:find("\\") and not clink.arg[-1]:find("%.")) then
    clink.arg.insert(-1, "powershell.exe")
end
  1. Save and close the userprofile.lua file.

Conclusion

In this guide, we have seen how to install Clink on Debian latest operating system. We have also seen how to configure Clink to use any shell of our choice. Clink is an indispensable tool for anyone who uses the Windows command-line environment regularly. With its powerful features, it makes command-line operations a breeze.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!