Linux command to view software information

Linux command to view software information

whereis,which,dpkg -L,dpkg -s,apt show,rpm -q{l|i|v}

The command prompt is root@hollowman-F117:~#: Log in as user hollowman in Ubuntu Kylin 20.10/ubuntu20.10, and switch to the root user for testing after opening the terminal. The
command prompt is [root@hollowman ~]#: in RHEL8 /CentOS8 directly log in as the root user and test

1.whereis

Shows the path of the relevant file after the software is installed, provided that the software has been installed.
Generally speaking, it /usr/binmeans the path of the executable file (binary file) and the path of the /usr/shareresource file

root@hollowman-F117:~# whereis ftp
ftp: /usr/bin/ftp /usr/share/man/man1/ftp.1.gz
[root@hollowman ~]# whereis ftp
ftp: /usr/bin/ftp /usr/share/man/man1/ftp.1.gz

2.which

Display the path of the running file (binary file) after the software is installed

root@hollowman-F117:~# which ftp
/usr/bin/ftp
[root@hollowman ~]# which ftp
/usr/bin/ftp

3. Deb package related query

For detailed information about the deb package, refer to: https://blog.csdn.net/ymz641/article/details/112688551

1) dpkg -L to
view the software installation path

root@hollowman-F117:~# dpkg -L ftp
/.
/usr
/usr/bin
/usr/bin/netkit-ftp
/usr/share
/usr/share/doc
/usr/share/doc/ftp
/usr/share/doc/ftp/BUGS
/usr/share/doc/ftp/README.Debian
/usr/share/doc/ftp/changelog.Debian.gz
/usr/share/doc/ftp/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/netkit-ftp.1.gz
/usr/share/man/man5
/usr/share/man/man5/netkit-netrc.5.gz

2) dpkg -s to
view the basic information of the software

root@hollowman-F117:~# dpkg -s ftp
Package: ftp
Status: install ok installed
Priority: standard
Section: net
Installed-Size: 138
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Source: netkit-ftp
Version: 0.17-34.1.1
Replaces: netstd
Depends: libc6 (>= 2.27), libreadline8 (>= 6.0), netbase
Description: classical file transfer client
 This is the user interface to the ARPANET standard File Transfer Protocol.
 The program allows a user to transfer files to and from a remote network
 site.
Original-Maintainer: Mats Erik Andersson <[email protected]>

3) apt show to
view the basic information of the software

root@hollowman-F117:~# apt show ftp
Package: ftp
Version: 0.17-34.1.1
Priority: standard
Section: net
Source: netkit-ftp
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Mats Erik Andersson <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 141 kB
Depends: libc6 (>= 2.27), libreadline8 (>= 6.0), netbase
Replaces: netstd
Task: standard
Download-Size: 55.2 kB
APT-Manual-Installed: no
APT-Sources: http://mirrors.aliyun.com/ubuntu groovy/main amd64 Packages
Description: 经典文件传输客户端
 这是 ARPANET 标准文件传输协议的用户界面。该程序可帮助用户和一个远程网络站点 之间交换文件。

4. rpm package related query

For detailed information about the rpm package, refer to https://blog.csdn.net/ymz641/article/details/111472917
1)rpm -ql to
view the software installation path

[root@hollowman ~]# rpm -ql ftp
/usr/bin/ftp
/usr/bin/pftp
/usr/lib/.build-id
/usr/lib/.build-id/fe
/usr/lib/.build-id/fe/93a289ddb32814099d9b6aec32dc566666bc8a
/usr/share/man/man1/ftp.1.gz
/usr/share/man/man1/pftp.1.gz
/usr/share/man/man5/netrc.5.gz

2) rpm -qi to
view the basic information of the program

[root@hollowman ~]# rpm -qi ftp
Name        : ftp
Version     : 0.17
Release     : 78.el8
Architecture: x86_64
Install Date: Fri 22 Jan 2021 05:13:46 AM CST
Group       : Applications/Internet
Size        : 114803
License     : BSD with advertising
Signature   : RSA/SHA256, Fri 14 Dec 2018 04:52:28 PM CST, Key ID 199e2f91fd431d51
Source RPM  : ftp-0.17-78.el8.src.rpm
Build Date  : Tue 11 Dec 2018 11:59:53 PM CST
Build Host  : x86-vm-02.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : ftp://ftp.linux.org.uk/pub/linux/Networking/netkit
Summary     : The standard UNIX FTP (File Transfer Protocol) client
Description :
The ftp package provides the standard UNIX command-line FTP (File
Transfer Protocol) client.  FTP is a widely used protocol for
transferring files over the Internet and for archiving files.

If your system is on a network, you should install ftp in order to do
file transfers.

3) rpm -qv
view package name

[root@hollowman ~]# rpm -qv ftp
ftp-0.17-78.el8.x86_64

Guess you like

Origin blog.csdn.net/ymz641/article/details/113278114