• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Problem installing and running exa, an elegant "ls" substitute

Started by fox, December 31, 2019, 08:28:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

exa is a utility that gives a nicer and more complete output than the command "ls". I read about it here, and wanted to try it. Problem is that the author provides instructions for installing in Arch, not Ubuntu. I tried to follow those instructions with what I thought were the equivalent commands. I got exa installed in the folder, ~/.cargo/bin, which is what should have happened. But when I tried the export command given in the instructions (export PATH=”~/.cargo/bin:$PATH”) and then tried to run exa, it didn't recognize the program. Then, using a terminal, I went directly to its folder and ran the same command (exa -l), but again it wasn't recognized. Next I opened a new terminal and along with a .cargo/bin folder alongside. I dragged the exa icon onto the terminal, added "-l", hit return and it ran! I don't see what the difference is between clicking on the exa icon (which is executable) and dragging it into a terminal. I also don't see why the export command didn't work. And it didn't whether I added it to the bash.rc file or implemented it in the terminal and then tried the exa command.

One other thing I tried was, in a terminal, I went to the folder where exa is located and used the command "bash exa -l". The result: "exa: exa: cannot execute binary file". I'm guessing that the application the executes exa isn't bash, and that pasting the icon is implementing the correct application, whereas typing it out isn't. I know that exa was written in rust, but putting "rust" in the terminal before "exa -l" doesn't help.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

#1
Is there a support question in here? If not, it should be in Linux Applications & Android apps which I will move it to but I just want to make sure you don't have an actual question.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Yes there is a support question. How to make exa operate just by typing its name in a terminal.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Okay, I'm not sure how to clean up what you've done. But I followed these steps instead (and it's easier):

       
  • Go to the exa website and download the zip file for Linux from there
  • unzip it and you will have the executable
  • Using sudo privileges, copy the executable to /usr/local/bin or really any directory within you path - you can find out your path by typing 'echo $PATH'
  • Change the name of it to just 'exa' using the mv command
  • Now you can use exa from anywhere
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Thanks for that, Jason! The fix was even easier. I copied the executable binary exa file I had already downloaded into /usr/local/bin. So it seems that for some reason, putting it in the .cargo folder and adding a PATH command for it didn't do the trick.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Quote from: fox on December 31, 2019, 01:49:08 PM
Thanks for that, Jason! The fix was even easier. I copied the executable binary exa file I had already downloaded into /usr/local/bin. So it seems that for some reason, putting it in the .cargo folder and adding a PATH command for it didn't do the trick.

I have no idea what cargo is but it's easier just to put programs in the already-existing path than to modify it.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13