First I've installed
company@rb-VirtualBox:~$ apt install curl E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? company@rb-VirtualBox:~$ sudo apt install curl [sudo] password for company: Reading package lists... Done Building dependency tree Reading state information... Done curl is already the newest version (7.68.0-1ubuntu2.7). 0 upgraded, 0 newly installed, 0 to remove and 552 not upgraded.
Then I tried to use it:
company@rb-VirtualBox:~$ curl -X GET 'http://localhost:9200' Command 'curl' not found, did you mean: command 'curl' from deb curl (7.68.0-1ubuntu2.7) Try: apt install <deb name>
As you can see it still says "Command 'curl' not found".
If I execute it with the full path like this:
company@rb-VirtualBox:~$ /usr/bin/curl -X GET 'http://localhost:9200'
then it works
company@rb-VirtualBox:~$ whereis curl curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz company@rb-VirtualBox:~$ echo $PATH /home/company/.nvm/versions/node/v17.8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin