Firstly you need make sure that the your IntelliJ folder is in the correct path, if you doesn't already have IntelliJ, you can do the download in official site:
https://www.jetbrains.com/pt-br/idea/download/?section=linux
Or you can try use the following command:
# Sometimes you can have some problems with your network connection or proxies, so try change de begin for curl -k ...
curl https://download-cdn.jetbrains.com/idea/ideaIC-2023.2.4.tar.gz --output ./intelliJ.tar.gz
Extract and move the folder to opt
WSL folder with the following commands:
Important
Pay attention to the names of the folders, this may change depending on the version you download
tar -xvzf intelliJ.tar.gz
sudo mv idea-IC-232.10203.10
After this just put the following command in ~/.bashrc
or ~/.zshrc
alias idea='/opt/idea-IC-232.10203.10/bin/./idea.sh "$1" > /dev/null 2>&1 &'
Tip
Usually after change something inside ~/.bashrc
or ~/.zshrc
, we need close the tab or all terminal to commit this changes, but you can try use the following command before do this alternatives: source ~/.bashrc
or source ~/.zshrc
Now you can run the following command inside project folder:
cd some-project-folder/
idea .