Fun Linux commands:-

The Linux command line can be the home of power users and sysadmins. However, Linux is more than just a lot of hard work. Linux was developed by fun-loving people who created an array of comical commands. Try playing around with these yourself when you want a smile.

Steam locomotive (SL)
For no reason whatsoever, you can cause a steam locomotive to zip across your terminal using the sl command. Install Steam Locomotive with your package manager. For example, on Fedora:
$ sudo dnf install sl

A steam locomotive engine drawing made from symbols and characters
Don Watkins, CC BY-SA 4.0

Real uses
As far as I know, the sl command is truly just for fun. Do you have an interesting use for sl? Let me know in the comments.

Fireplace (aafire)
Warm your heart and your terminal with aafire command, which causes a fireplace animation to play. You can install aafire with your package manager. On Debian, Mint, Elementary, and similar:

$ sudo apt install libaa-bin

On Fedora, CentOS, and others:

$ sudo dnf install aalib

A black and white image of a fire made from text symbols and characters
Don Watkins, CC BY-SA 4.0

Real uses
This image is a subtle way to communicate to your team or boss that everything’s about to go up in smoke.

You can use the yes command to print out a string of text until it is forcibly stopped with Ctrl+C. For example, I am a Buffalo Bills fan, so I chose to print out an endless series of Buffalo Bills with the yes command:

$ yes Buffalo Bills

A screenshot showing repeated lines of Buffalo Bills (left edge slightly cut off)
Don Watkins, CC BY-SA 4.0

Real uses
You can use this command to pipe confirmation to scripts so that when a script pauses to ask for confirmation, it automatically receives yes. For example, imagine there’s a script you run that often stops to ask you for confirmation:

$ foo
Are you sure you want to do this? Y/n Y
Are you sure? y/N Y
But are you? y/N
You can auto-accept such messages bypassing yes to the command:

$ yes | foo

Alternatively, you can auto-deny messages using yes as well:

$ yes no | foo

You can have your fortune told on the command line by installing Fortune. Fortune prints a random and possibly meaningful message.

Install Fortune with your package manager:

$ sudo apt install fortune

On Fedora:

$ sudo dnf install fortune-mod

The fortune command has many datasets it can draw from. For instance, you can get famous quotes from literature or the science-fiction TV show Firefly, or choose from jokes, tips about Linux, and much more. Search your repository for “fortune” to see what options your distribution provides.

$ fortune
Johnson’s law:
Systems resemble the organizations that create them.
Real uses
You can use Fortune to generate a pseudo-random number. There’s not enough entropy to make it cryptographically secure, but when you need an unexpected number, you can count characters or words:

$ fortune | wc –chars
$ fortune | wc –words
$ fortune | wc –chars
Lolcat is a program that concatenates files, or standard input, to standard output (like the generic cat) and adds rainbow coloring to it. You can pipe the output of other commands to lolcat, which provides a rainbow hue to the result.

Here’s the result of lolcat -h for its help output:

onscreen text colored in a rainbow gradient
Don Watkins, CC BY-SA 4.0

Figlet and banner
The figlet and banner commands let you create simple ASCII text banners. Here’s a text banner for a CentOS system:

$ figlet

Text banner reading “” composed from symbols and characters
Don Watkins, CC BY-SA 4.0

Pipe figlet to lolcat for a colorful banner:

$ figlet | lolcat

A text banner reading “” made rainbow colored with lolcat
Don Watkins, CC BY-SA 4.0

$ banner Hello World

A banner reading “Hello World” spelled out with pound symbols
Don Watkins, CC BY-SA 4.0

You can add speech capabilities to your command line funnies by installing espeak.

Once espeak is installed, turn up the volume on your computer and have some fun listening to your machine talk to you. Espeak is a software speech synthesizer, and there are a few different voice libraries available.

$ espeak “Linux is the best operating system.”

Source link

5 Basic linux commands with detailed explanation and their resemblance to windows.

Linux sometimes seems to be very difficult from the outside but once you get a head start there are a ton of possibilities with linux which are not available with windows. Obviously you may not get as attractive and beginner friendly interface as windows does but everything comes with a price doesn’t it.

Here I will list 10 commands and explain them which you could try out yourself on your linux OS right away and experience it yourselves.

  1. df

    this command will show the amount of available disk space and used disk space for file system to which you as a user currently has access to. For eg : if you have a dual boot system established in your pc and your linux OS doesn’t have access to the D folder.If you run this command on your linux terminal then you wont be able to see the partiton of used and unused space of D folder. this command is same as when you open the disk management tool in windows.
    df command

  2. top

    This command when you type in your terminal it will show the active linux processes which are managed by your linux kernel. This command is used like how you would use task manager in windows, the difference being , it shows the details of all the processes in far more depth than windows does.

    • it will look something like this when you type the command.
    • this is what is meant by each column head.

      you can press ‘q’ to exit this window in your termial.
  3. ls
    This command list all the files and directory present in the location of where you are in your system. for example if you are in a directory games which has 3 sub-directory. then this command will list those 3 sub-directory.
    observe in the below image how the directories are highlighted in the terminal.

  4. cd
    This command is a fairly self explanatory command,”’cd”’ is a change directory command when you type

    cd [directory name]

    then you will be in that particular directory. If you type

    cd ..

    you will go in the root directory of current directory.

  5. touch
    This command is used to create a file. This works like when you right click and create a new document in windows. You have to type

    touch [filename.extension]

Source link