0

I have been using netstat 1.42 without any problem but yesterday I installed a fresh VPS and when I try to set commands netstat does not show anything.

I use this command to see all active TCP connections:

netstat -tn 2>/dev/null | grep :80| awk '{print $5}' | cut -d: -f1 | sort | uniq | sort -nr | paste -sd, - 

When I check the version I see the version 2.10-alpha. How do I change to the 1.42 version or what has changed on this new version?

I'm new in this

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972

1 Answers1

0

you can install specific version of any package with apt

apt-cache policy packages

output sample for net-tools :

net-tools:
  Installed: 1.60-26ubuntu1
  Candidate: 1.60-26ubuntu1
  Version table:
 *** 1.60-26ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

run this command to find all the available version of a package then choose your favorite version and install it with bellow command

sudo apt install packages=version

example usage for net-tools :

sudo apt install net-tools=45.0.2+build1-0ubuntu1
  • mm it says `net-tools: Installed: (none) Candidate: 1.60+git20180626.aebd88e-1ubuntu2 Version table: 1.60+git20180626.aebd88e-1ubuntu2 500 500 http://nova.clouds.archive.ubuntu.com/ubuntu groovy/main amd64 Packages ` but i want this: `net-tools: Installed: 1.60-26ubuntu1 Candidate: 1.60-26ubuntu1 Version table: *** 1.60-26ubuntu1 500 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status ` or what i have to change in my command to get the same output? – Roberto Nervo Jul 08 '21 at 09:07
  • replace this repository `deb http://us.archive.ubuntu.com/ubuntu focal main` in `/etc/apt/sources.list` with `http://nova.clouds.archive.ubuntu.com/ubuntu groovy/main` and run `sudo apt update` finally try again – Morteza Mohammadi Jul 08 '21 at 09:12
  • i have this http://nova.clouds.archive.ubuntu.com/ubuntu groovy/main on this file – Roberto Nervo Jul 08 '21 at 10:05
  • nop add or replace new repository `deb http://us.archive.ubuntu.com/ubuntu focal main` and do stuff – Morteza Mohammadi Jul 08 '21 at 11:03
  • still install 2.10 alpha – Roberto Nervo Jul 09 '21 at 09:34
  • https://i.imgur.com/OkDFcWX.png this is de source.list – Roberto Nervo Jul 09 '21 at 09:38