lolcat cowsay Linux colors

Colors in the Linux Console with lolcat, cowsay and fortune

For those who believe that the Linux Command Line is boring and not fun, they are probably wrong. This post is about fantastically colors in Linux terminals by lolcat and cowsay or fortune.

I installed the small utility called “lolcat”, which can display the outputs in rainbow colors in the terminal, on a Fedora Workstation 30 and on a Linux Mint 20 (Ubuntu).

Colors in the Linux Console with lolcat, cowsay and fortune

What is Lolcat ?

lolcat is a utility for Linux, BSD and OSX that works similarly to the cat command (Unix) and outputs in rainbow colors. The application /usr/bin/lolcat is similar to the /usr/bin/cat, closely known for Unixoid OS. concatenate (chain). lolcat is mainly used to output text outputs in rainbow colors in the Linux terminal. lolcat was originally developed in Ruby, there is clone on Python, and besides that in C of jaseg, this probably most performant version, is available as a binary in many repository of the distributions.

Install lolcat

So the easiest thing is to install lolcat directly from the default repository. Fedora installs lolcat as follows.

sudo dnf install -y lolcat

For Linux Mint, which is based on the Linux distribution Ubuntu, the deployment is therefore as usual with the apt-get package manager.

sudo apt install -y lolcat

commands output in rainbow colors

Now commands can be output in rainbow colors, such as the calendar.

Cal | lolcat
Cal | lolcat

Spend the extended calendar for the whole year.

cal -y | lolcat -v 1.1 -h 0.6

To get a different welcome message in the form of a quote each time you open the terminal, similar to MOTD, the following lines can be inserted into the .bashrc file at the bottom, with an editor of choice such as nano .bashrc, or vi .bashrc

function cowsayfortune
    NUMOFCOWS='cowsay -l | tail -n +2 | wc -w'
    WHICHCOW=((RANDOM%$NUMOFCOWS+1))
    THISCOW='cowsay -l | tail -n +2 | sed -e 's/'n/g' | sed $WHICHCOW'q;d''

#echo "Selected cow: "THISCOW," from "WHATCOW""
    fortune | cowsay -f $THISCOW -W 100 | lolcat -v 1.1 -h 0.6
}

cowsayfortune

Install cowsay

To do this, cowsay still needs to be installed, so that funny animals or mythical creatures are drawn in ASCII text, whereby the message appears in a speech bubble.

sudo dnf install -y cowsay

For Linux Mint and Ubuntu again as follows.

sudo apt install -y cowsay

Also, for example, the page can be refreshed with rainbow colors.

man cowsay | lolcat
lolcat cowsay Linux colors, man cowsay | lolcat
man cowsay | lolcat

The query of the network configuration is made much clearer by color-separated contrasts, with the lolcat parameters vertical_speed (-v) and horizontal_speed (-h).

ip a | lolcat -v 10 -h 0
lolcat cowsay Linux colors
ip a | lolcat -v 10 -h 0

Some more examples of using lolcat.

cowsay -f kitty U Can't Touch This | lolcat -v 1.1 -h 0.5
cowsay
cowsay -f kitty U Can’t Touch This | lolcat -v 1.1 -h 0.5
fortune | cowsay -f eyes | lolcat -v 2
lolcat cowsay Linux colors
fortune | cowsay -f eyes | lolcat -v 2
fortune -n long | cowsay -f dragon-and-cow | lolcat -v 1.2 -h 0.8
lolcat cowsay Linux colors
fortune -n long | cowsay -f dragon-and-cow | lolcat -v 1.2 -h 0.8
cowsay -f ghostbusters Look at my gist https://gist.github.com/donkey | lolcat -v 2
cowsay -f
cowsay -f ghostbusters Look at my gist https://gist.github.com/donkey | lolcat -v 2
figlet -c Welcome | lolcat -v 2
figlet -c Welcome | lolcat -v 2
figlet -c Welcome | lolcat -v 2

There are countless ways to use lolcat, here are just a few examples for illustrative purposes. How to decorate some useful system commands with lolcat here.

date | lolcat
dmesg | lolcat
last | lolcat
free -m | lolcat -v 10 -h 0
sudo du -h | lolcat
tree -s | lolcat -v 2
hostnamectl | lolcat -v 2
hexdump -C .bashrc | lolcat -v 10 -h 0
ip a | lolcat -v 10 -h 0
ip -4 a | lolcat -v 10 -h 0 && ip -6 a | lolcat -v 15 -h 0
route -n | lolcat -v 10 -h 0
sudo lsof -i | lolcat -v 20

The cowsay file list and the help page, as well as the fortune options.

cowsay -l
Cow files in /usr/share/cowsay:
beavis.zen blowfish bud-frogs bunny cheese cower default dragon dragon-and-cow elephant elephant-in-snake eyes flaming-sheep ghostbusters head-in hellokitty kiss kitty koala kosh luke-koala mech-and-cow meow milk moofasa moose mutilated sheep ren skeleton small stegosaurus stimpy supermilker surgery

cowsay -h
cow say,think' version 3.03, (c) 1999 Tony Monroe
Usage: cowsay [-bdgpstwy] [-h] [-e eyes] [-f cowfile]
        [-l] [-n] [-T tongue] [-W wrapcolumn] [message]  
fortune[-afilosw] [-m pattern]f[-n number][ [#%]ile/directory/all]

Windows SMBv1 1.0/CIFS Client Server

SMB: Unable to access windows share using SMBv1 1.0/CIFS Client Server

Microsoft announcement of 01.07.2020.

Windows 10 Fall Creators Update and Windows Server, version 1709 (RS3) and later versions, the Server Message Block Version 1 (SMBv1) network protocol is no longer installed by default. The Windows SMB (SMBv1) protocol has been replaced by SMBv2 and newer protocols (SMBv3) since 2007. Microsoft publicly rejected the SMBv1 protocol in 2014.

Windows SMB v1 has vulnerabilities that allow remote code execution or denial-of-service attacks. Therefore it should be deactivated. Windows 10 Enterprise and Windows Server 2016 no longer includes the SMB v1 client or SMBv1 server by default after a new installation.

Windows 10 Home and Windows 10 Pro still contain the SMBv1 client by default after a new installation. If the SMBv1 client is not in use for a total of 15 days (except for the computer that is turned off), it is automatically uninstalled.

SMBv1 can still be reinstalled in all editions of Windows 10 and Windows Server 2016.

Enable SMBv1 using the MSC method

The SMBv1 network protocol can be activated on Windows 10 and Windows 11 with the Windows+R and the input of control appwiz.cpl,,2 in the Windows Features window.

Windows SMBv1 1.0/CIFS Client Server, appwiz.cpl

Open Windows-Features of Windows 10 / Windows 11.

Windows SMBv1 1.0/CIFS Client Server

Check windows feature with support for SMB 1.0/CIFS file sharing check boxes:
– SMB 1.0/CIFS Automatically remove
– SMB 1.0/CIFS client

The SMB 1.0/CIFS client will remain activated as long as it is used, if no activity is detected during the 15 days. SMBv1 will deactivate itself for security reasons.

PowerShell method enable SMBv1

Enable SMB 1.0/CIFS in the PowerShell as follows, administrator rights are required.

PS C:\> Enable-WindowsOptionalFeature -Online FeatureName SMB1Protocol

Check the status of SMBv1 in the PowerShell.

PS C:\> Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Disable the Windows SMB SMBv1 network protocol in the PowerShell

PS C:\> Disable-WindowsOptionalFeature -Online FeatureName SMB1Protocol

The computer must be restarted after these changes are made.

If you want to automatically remove the feature SMB 1.0/CIFS, probably from a login script. The method is suitable with using Deployment Image Servicing and Management (DISM).

PS C:\> Dism /online /Disable-Feature /FeatureName:"SMB1Protocol" /NoRestart

The feature SMB 1.0/CIFS client and server are removed without prompting any user interaction, administrator rights are required; the change will take effect the next time the client is started.

Conclusion

This tutorial shows what to do if you get the error message “Unable to access windows share” after trying to access a file share. This error message first appears after the Windows 1709 update has been applied.

I’ll show you what to do how to enable SMB 1.0/CIFS protocol. To become access to windows share using SMBv1 1.0/CIFS Client Server.