I downloaded IntelliJ IDEA for my linux system. It says to add the location of the bin folder of IntelliJ to the PATH environment variable in order to run IntelliJ from any folder. So, I opened .bashrc and put in the address - 'export PATH=$PATH:/Documents/IntelliJ/bin' and then 'source ~/.bashrc'. Then, to check I echoed by PATH and it showed the changes. But, when I try to run './idea.sh' from some other directory it does not work. It says file not found. I have no idea what's hapenning?
Asked
Active
Viewed 766 times
0
-
The `./` there says to bypass the `PATH` entirely, and only look in the current directory. – tripleee Jan 17 '20 at 05:28
-
@tripleee what do I type in then? – Aakash Dasgupta Jan 17 '20 at 05:30
-
If `idea.sh` is on the `PATH` and is executable, leave out the `./`. But `/Documents` doesn't look correct either; I guess you mean `~/Documents`? – tripleee Jan 17 '20 at 05:31
-
@tripleee when I just type idea.sh , it says command not found – Aakash Dasgupta Jan 17 '20 at 05:35
-
We are left to to guess a lot of things here. If the file is `~/Documents/IntelliJ/bin/idea.sh` and is executable then typing exactly that at the prompt should work, and just adding the missing tilde to the `PATH` should allow you to run it without specifying its directory. If these conditions are not true then you probably need to do more homework before you ask a new question or [edit] this one to update it with pertinent details. – tripleee Jan 17 '20 at 05:43
-
(Putting stuff which isn't a document in `Documents` is slightly weird, but I have no formal objection.) – tripleee Jan 17 '20 at 05:44
-
I got it! I had to edit the PATH a bit and put '/home' at the start. It works now. Thanks a lot. The reason I put it in documents is coz I'm new to linux and can't seem to create a folder in my local disk. – Aakash Dasgupta Jan 17 '20 at 05:44
-
You can create stuff inside your home directory but not at the top level. – tripleee Jan 17 '20 at 05:47
-
Surely that would be `/home/you` (which can be abbreviated `~`) and not just `/home`. – tripleee Jan 17 '20 at 05:50