There are some sources blocked in my country. So when I do apt-get update I get th ane error below:

alexander@Alexander-PC:~$ sudo apt-get update
[sudo] password for alexander: 
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://extras.ubuntu.com trusty InRelease                       
Hit http://security.ubuntu.com trusty-security Release.gpg           
Get:1 http://dl.google.com stable InRelease [1,540 B]                
Hit http://extras.ubuntu.com trusty Release.gpg                                
100% [1 InRelease gpgv 1,540 B] [Waiting for headers] [Waiting for headers] [WaSplitting up /var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stabIgn http://dl.google.com stable InRelease                                      
E: GPG error: http://dl.google.com stable InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
alexander@Alexander-PC:~$ ^C

when I use proxy it works perfectly. Now I don't have any proxy can I use TOR ?

My question is: can I redirect the terminal through tor?


If you set the proxy to use at the system level, almost all network requests (regardless of program origin) will be routed through the proxy. Tor is, simply put, a more complex proxy.

Note that, according to this you may get an error if you use Google's repo.


Proxy: Try the following procedure

  • set (tor port, may be something else for you )in System -> Preferences -> Network Proxy

  • torify is tool that attempts to wrap your terminal command in a Tor session. There's a good tutorial on what you need to do, here. Then it's just a case of running:


  • Using Proxychains

  • torify (as well as torsocks) should not be used. When they can't securely handle a system call made by an application running in them, they simply don't actually perform the system call, which, with apt install, apt upgrade, or apt dist-upgrade, can ruin installations and upgrades of software without APT noticing the problem. – Chai T. Rex Jun 18 '18 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.