4

I'm using Kali Linux but the "apt-get install" command is not working to install any application on my system.

I think it's got something to do with my Kali Linux repository sources.list file. The file may be empty or the current repo address is wrong or experiencing a problem.

Please, could someone provide me a link to the Kali official sources.list file

closed as unclear what you're asking by daisy, Stephen Rauch, Jeff Schaller, Rui F Ribeiro, dr01 Jun 26 '17 at 8:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Is it a freshly installed Kali Linux? – 7_R3X Jun 26 '17 at 5:29
19

Open a terminal and follow these instructions:

  1. Type sudo -i
  2. Type in your password.
  3. Type touch /etc/apt/sources.list
  4. Type chmod 644 /etc/apt/sources.list
  5. Type echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
  6. Type apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6
  7. Type apt-get update
  8. Now install whatever it is that you want to install.
  • 2
    I upvoted this answer because Google led me to it when I searched for why 'apt-get update' didn't do anything. It was the 2nd answer from the google-gods and quickly fixed the problem. – Jim M Oct 11 '17 at 22:03
  • What i get on step 6 is gpg:keyserver failed: Network is unreachable. How should I solve that .. installed Kali and all I see is the bash shell mode. – Toma Tomov Sep 10 '18 at 20:26
  • @TomaTomov : Are you able to access the internet? Are you working behind a proxy? – 7_R3X Sep 11 '18 at 5:57
  • I think I am not able to access it. No. I am not behind proxy. How to check if i am connected to internet through the command line? What I found is that I need wpa_supplicant but I can't install it without the net connection I guess because when I try I get Network connection failed. I am really sorry for my confusing answers but I am total newbie. For now :) – Toma Tomov Sep 11 '18 at 7:53
  • 1
    @TomaTomov : apt-get update does require an internet connection because it downloads information regarding the latest packages and their versions from the repository. You won't be able to take update unless you have an internet connection. To check if you are connected try pinging a website. for example, ping duckduckgo.com and see if it replies. This is a simple but not a sure shot to check your internet connectivity. Depending upon your environment and firewall configurations, you may or may not get a reply. – 7_R3X Sep 11 '18 at 8:00

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