Bring the best of Linux to Windows with CASH
Linux and Windows are two different operating systems, especially the command line. Windows Command Prompt is like an annoying mess, rather than an indispensable part of the operating system. In contrast, Linux is designed to be very elegant, while helping users easily work efficiently.
Therefore, it is not surprising that many tools are designed to make Windows look like Linux. One of the most potential options is CASH (a recursive acronym for 'Cash Shell').
Bring the best of Linux to Windows with CASH
- What is Cash Shell?
- Install CASH
- Mix Linux and Windows commands
- Unix-style rights
- Install the necessary components
- Handling text files like on Linux
- The command line is similar to Linux
What is Cash Shell?
Cash Shell to create a compact, Linux-like shell for Windows. Its essence is to re-deploy existing Linux utilities using the latest JavaScript generation, called EcmaScript 6.
The overall philosophy of the project is that you will be able to run "ls -l", or use Grep to find something and it will work on Windows just like on Linux.
Although it has just started, it already contains some core Linux utilities, including cat, clear, echo, export, false, grep, less, mkdir and more. Although not comprehensive, it is enough to help you work effectively.
Cash is a 'newcomer' in an increasingly competitive field. From the start, it had to compete with rivals like Cygwin, Shell.js and Cooperative Linux. But Cash has a special advantage over competitors.
Take Cygwin and Cooperative Linux for example. To install Cygwin, you must also install some cumbersome DLL files. Cooperative Linux (colinux.org) is even worse, because literally you will have to run a limited Linux version at the same time. But CASH is very light, only megabytes and only a dependency, that's node.js.
Simply put, it is a more streamlined and faster product.
Install CASH
So, if you are convinced, here's how you can install Cash. It's easier than you think. First, you must visit the Node.JS website (https://nodejs.org/en/) and install the latest version for Windows.
This, in addition to containing the Node.JS interpreter (running JavaScript code), also contains the Node Package Manager (NPM). Somewhat similar to apt-get and allows you to download other people's code. To install Cash, simply run the following command.
npm install cash -g
It is worth mentioning that Cash developers plan to release it as an easy-to-install MSI file. When you read this article, that may have become a reality. To find out more, check out the official Github page (https://github.com/dthree/cash).
If Cash is installed without any error messages, it is ready to use. Type cash to go to Cash shell and read to know what it can do.
Mix Linux and Windows commands
One of the best things Cash can do is mix Linux and Windows commands. Imagine you want to list all USB drivers installed on your machine.
You can do that by running the driverquery command (one of many useful Windows commands), and converting it to Grep. While you do this, you can also arrange drivers using Linux's sort command. Here's how to proceed in detail:
driverquery | grep USB | sort
Some users think that many Cash commands are actually fake Windows commands like Linux commands. But if you look a little deeper, everything will start to clear up.
Just check the help page for ls and you will understand the nature of the problem.
Similarly, implementing the Grep command of Cash is 100% compatible with POSIX, as shown below. Most notable is when you consider each utility basically written from scratch in JavaScript.
Unix-style rights
Another interesting thing that users like about Cash is that it brings UNIX-style access to Windows. Just run ls -l and you'll see each file listed with your rights, written in traditional UNIX symbols.
Sadly, the chown command is not currently ported, so you can't change the file and directory permissions as you would in Linux. This is expected to appear in a future Cash version.
Install the necessary components
One of the general ideas of CASH is that everything must be gentle and effective. As a result, you can install Linux commands on a partial basis. If only ls is needed, run:
npm install cash-ls -g
Just adjust the above command for the utility you are trying to install.
Handling text files like on Linux
If you have to handle large text files, such as text files produced as log files of utilities like Logcat, you can do the best when using Linux. In fact, Linux has a lot of text editing tools and many of them can come to Windows, thanks to Cash.
The article mentioned Grep and Sort above. Cash also has Tail, Head, Less and Cat.
Of course, Cash needs some other additions to make it more convenient for users. Right now, if you want to use the Vim text editor from within a terminal on Windows, you must use Cygwin. Similarly, there is no Sed or Awk.
The command line is similar to Linux
Perhaps the favorite thing about Cash is that it allows you to handle everything like you do on Linux. The directories work just like on Linux. You can move from these directories as you can on Linux. You can access the files, before quickly removing them with the "rm" command .
You can also create and delete aliases, and copy and move files or folders like you do on Linux. This is really great.
With the information provided in this article, will you install Cash?
Would you like to test it or stick with Linux or Cygwin virtual machines? Whether you make any decisions, let us know in the comments below!
See more:
- What do Windows and Linux have in common?
- How to run Windows applications on Linux with Wine
- How to create dual boot Linux and Windows 10 on Linux
You should read it
- What is a shell?
- Math functions are available in Shell
- Basic Shell operators
- Techniques cited in Unix / Linux
- Basic Shell commands in Linux
- How to Get Money on Square Cash
- The while loop in Shell
- Useful commands in Unix / Linux
- For loop in Shell
- C Shell operators
- Until loop in Shell
- 7 ways to run Linux software on Windows
Maybe you are interested
How to Listen to FM Radio on Linux
How to switch users on the Linux command line
How to execute Shell script in Linux
AMD Ryzen 9000 CPU runs on Linux for higher performance than Windows 11
New Intel microcode '0x129' tested on Linux, did not show a major impact on performance
How to set up Wireguard VPN on Linux