The Linux terminal has a strong UI. Most distributions have good defaults, and it makes utilizing the command-line a lot simpler. Nonetheless, for as nice because the Linux terminal is, enhancements are at all times welcome, particularly those who make the Linux terminal person pleasant.

SPOILER ALERT: Scroll down and watch the video tutorial on the finish of this text.

Introducing ColorLS, a command-line addition that may make utilizing the terminal a lot nicer. It provides nicer fonts, and icons subsequent to completely different recordsdata within the command-line (like a music icon subsequent to an MP3 file, an image icon subsequent to a JPG file, and so on.)

Set up Ruby

The ColorLS app requires work as there isn’t a simple option to set up the software program. As of now, there aren’t any downloadable packages, and no Linux distributions have direct assist for the software program. As a substitute, to make use of it, it’s essential to construct the software program from scratch.

ColorLS is a Ruby gem, so the Ruby programming language is a prerequisite. The Ruby programming language and run-time aren’t tough to put in on Linux.

To get Ruby, open a terminal and comply with the directions that correspond together with your distribution.

Ubuntu

sudo apt set up ruby ruby-dev git

Debian

sudo apt-get set up ruby ruby-dev git

Arch Linux

sudo pacman -S ruby git

Fedora

sudo dnf set up ruby git -y

OpenSUSE

sudo zypper set up ruby git

Generic Linuxes

ColorLS wants Ruby, and there’s no approach round it. For those who don’t set up it, ColorLS merely gained’t run. Fortunately, even probably the most obscure Linux distributions can simply set up the Ruby language/runtime, as a consequence of some Linux applications made with Ruby.

Open up a terminal, use the package deal supervisor to seek for “Ruby” and set up it. Can’t get Ruby? Head over to the official website and construct it manually. Make certain that you additionally set up the Git software, because it’s needed for interacting with the varied Git repos on this tutorial.

Set up Fonts

The superb options that ColorLS has come from a customized font. This font supplies a custom-made look and so many different issues that simply aren’t doable with fonts that the majority Linux distributions ship with. In consequence, earlier than getting to make use of the ColorLS terminal add-on, it’s essential to set up Nerd-Fonts.

Nerd-Fonts is big and can take a very long time to seize from GitHub. In a terminal, clone the recordsdata to your Linux PC.

git clone 

Cloning the Nerd-Fonts recordsdata will take a very long time, so it’s greatest to only depart the terminal window open and go do different issues. When it completes, it’s time begin the set up.

First, use the CD command and transfer the terminal into the “nerd-fonts” folder in your PC.

cd nerd-fonts

The Nerd-Fonts package deal comes with an set up script in order that customers don’t want to position the recordsdata on the system manually. Execute the script with:

./set up.sh

Let the script set up the fonts, however be affected person, as set up takes fairly some time.

Set up ColorLS

ColorLS is up on Github, so to get it, open up a terminal and use the git clone command.

git clone 

Transfer the terminal into the sources folder with the CD command.

cd colorls

Set up this system with the ruby command.

sudo gem set up colorls

Utilizing ColorLS

ColorLS is an software and doesn’t want any configuration to run. To reap the benefits of it, open up a terminal and run it in any listing.

LnnwAAAABJRU5ErkJggg==

colorls

Working the essential ColorLS command with no modifiers or switches will print out all recordsdata within the listing it’s in, together with particular icons subsequent to every file sort. Nevertheless, it won’t present hidden recordsdata, except the “a” swap is used.

colorls -a

View Permissions

Like the standard LS command, ColorLS can view extra than simply recordsdata in a given listing. It will possibly additionally decide the possession of recordsdata, permission settings, type recordsdata, and so on. To view permissions with the ColorLS software, run the next command in a terminal.

colorls -l

Kind Information By dimension

With the “S” swap, ColorLS can present and type recordsdata with dimension in thoughts. To do that, run:

colorls -S

Solely Present Folders

Wish to view gadgets in a listing however solely need to see sub-folders? By working the ColorLS command with the d swap, you’ll be able to. In a terminal, do the next.

colorls -d

Save ColorLS Command Arguments To File

There are dozens of various choices for the ColorLS software that make it a very helpful and colourful alternative to the LS command. For those who’d wish to see all the command arguments, run ColorLS in a terminal with the assist swap.

colorls --help

Alternatively, it’s doable to save lots of the “help” data that seems when the above command is run by piping it to a textual content file.

colorls --help >> ~/Paperwork/colorls-commands.txt

View the contents of the textual content file in a terminal utilizing the cat command.

cat ~/Paperwork/colorls-commands.txt



Source link

Share.
Leave A Reply

Exit mobile version