How do I temporarily remove proxy settings?

I set my proxy settings using the following command

export http_proxy=http://proxyusername:proxypassword@proxyaddress:proxyport

When I do

echo $http_proxy

I get

http://cavs@students:[email protected]:80

However when I do

unset $http_proxy

I get an error

-bash: unset: `http://cavs@students:[email protected]:80': not a valid identifier

So I did

$http_proxy = ""

which also gives me the following error

-bash: http://cavs@students:[email protected]:80: No such file or directory

How do I completely remove this proxy setting?


Solution 1:

The correct way to use unset is without the $, so you can do the following:

unset http_proxy

to unset your proxy settings or you can even use the following:

http_proxy=""

Note that there is no space in before and after the =.