7

I've accidentally corrupted the uname file in the /bin/ directory and now it does not return any information. Is there any possible way to recreate it?

Zanna
  • 70,465
smaj
  • 81

1 Answers1

32

Locate the binary file:

$ which uname
/bin/uname

Find out which package provides the file:

$ dpkg -S /bin/uname
coreutils: /bin/uname

Reinstall the package using the --reinstall flag

sudo apt install --reinstall coreutils

This replaces all the files of the package except configuration files.

Zanna
  • 70,465