0
votes

Im trying: sudo /Users/oliver/Desktop/vpn/natvpn.sh

Getting command not found: sudo: /Users/oliver/Desktop/vpn/natvpn.sh: command not found

Can't seem to figure out how to fix it tried a lot of fixes on forums but no luck.

whereis sudo returns: /usr/bin/sudo

echo $PATH returns: /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin

I'm on mac os 11.2.3

What could be causing this and is there a fix?

2
Are you sure the script file exists at that exact path? Also, what is the script's shebang (first line)? Have you granted Terminal access to your Desktop (see this q? - Gordon Davisson

2 Answers

0
votes

The sudo package is pre-installed on most Linux distributions. But seems your machine does not have it. Did you installed sudo package on the machine, If not kindly try below command to install sudo

apt-get install sudo
0
votes

Try these:

sudo ~/Desktop/vpn/natvpn.sh

or

sudo /home/oliver/Desktop/vpn/natvpn.sh