If it is a Linux system such as ubuntu/debian that uses dpkg package management software, use:
dpkg -l software name
If it is a Linux system such as centos/redhat that uses rpm package management software, use:
rpm -ql software name
The above command can list all the files (installation path) of a software package, but if you want to upgrade the software, you should use other commands provided by the package management software to upgrade instead of replacing any files yourself!
rpm -ql software name View the directory where the software is installed
If it is a Linux system such as ubuntu/debian that uses dpkg package management software, use:
dpkg -l software name
If it is a Linux system such as centos/redhat that uses rpm package management software, use:
rpm -ql software name
The above command can list all the files (installation path) of a software package, but if you want to upgrade the software, you should use other commands provided by the package management software to upgrade instead of replacing any files yourself!