In this guide, we will illustrate how to install and use Nu shell on Linux.
Nu shell is a new Linux shell, it aims at simplifying command outputs with pipe. It comes with interesting built-in commands, is fast and easy to use. The focus of Nu shell is Pipe-lining which enables terminal users to own the terminal, commanding it to produce the output as needed.
Install Nu Shell on Linux
Install Latest of nu shell
- Download the latest release of Nu shell by running the below command
curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep linux | wget -i -
- Extract the archived file.
tar xvf nu_*_linux.tar.gz
- Copy the extracted file to /usr/local/bin/ path for it to be executable
cd nu_*_linux/nushell-*/ cp -R * . /usr/local/bin/
- Check version of nu shell
nu --version nushell 0.44.0
- Start Nu shell by running the command nu as shown below:
nu Welcome to Nushell 0.44.0 (type 'help' for more info) /home/qadry>
Install and run Nu Shell with Docker
- Run the following command to install Nu shell with docker.
docker run -it quay.io/nushell/nu:latest Unable to find image 'quay.io/nushell/nu:latest' locally latest: Pulling from nushell/nu 123347c49d0f: Pull complete 419640447d26: Pull complete 61k83d862619: Pull complete 7495ba04a596: Pull complete 172cuc92237d: Pull complete Digest: sha256:3kiw8ae65b58232a863f243ed06jaf35j8al91880ad8623f4a508fa12340ksahw Status: Downloaded newer image for quay.io/nushell/nu:latest Welcome to Nushell 0.44.0 (type 'help' for more info) />
Use Nu Shell
- Try to run ls command for example, you will find there is a difference between the output and the normal shell output, in Nu shell, the output will be in structure table
- You can sort your table above with sizes
> ls | sort-by size
- As you show above, the results arranged in a descending mode, use reverse flag to change that to ascending as shown below
> ls | sort-by size | reverse
- Also you can view or open the files, for example we will open backup.log file
- the screenshot below shows what does the same file look like with being opened with vim
- Show the current date with command:
- Run the cal command
In this tutorial, we showed you how to install and use Nu shell in Linux.