LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Determine name of installed package (https://www.linuxquestions.org/questions/linux-newbie-8/determine-name-of-installed-package-4175610851/)

NotionCommotion 07-29-2017 08:56 AM

Determine name of installed package
 
How does one determine the command name of an installed package?

For instance, after installing the below, I would have expected it to be nmap-ncat, but it is really ncat or nc.

Thanks

Code:

[michael@box1 ~]$ sudo yum install nmap-ncat.x86_64
[sudo] password for michael:
Loaded plugins: fastestmirror
base                                                                                                                                              | 3.6 kB  00:00:00
epel/x86_64/metalink                                                                                                                              |  13 kB  00:00:00
epel                                                                                                                                              | 4.3 kB  00:00:00
extras                                                                                                                                            | 3.4 kB  00:00:00
gitlab_gitlab-ee/x86_64/signature                                                                                                                  |  836 B  00:00:00
gitlab_gitlab-ee/x86_64/signature                                                                                                                  | 1.0 kB  00:00:00 !!!
gitlab_gitlab-ee-source/signature                                                                                                                  |  836 B  00:00:00
gitlab_gitlab-ee-source/signature                                                                                                                  |  951 B  00:00:00 !!!
influxdb                                                                                                                                          | 2.5 kB  00:00:00
mariadb                                                                                                                                            | 2.9 kB  00:00:00
remi-php71                                                                                                                                        | 2.9 kB  00:00:00
remi-safe                                                                                                                                          | 2.9 kB  00:00:00
updates                                                                                                                                            | 3.4 kB  00:00:00
(1/4): epel/x86_64/updateinfo                                                                                                                      | 797 kB  00:00:00
(2/4): epel/x86_64/primary_db                                                                                                                      | 4.8 MB  00:00:00
(3/4): influxdb/7/x86_64/primary_db                                                                                                                |  20 kB  00:00:00
(4/4): updates/7/x86_64/primary_db                                                                                                                | 7.8 MB  00:00:00
(1/2): gitlab_gitlab-ee-source/primary                                                                                                            |  175 B  00:00:00
(2/2): gitlab_gitlab-ee/x86_64/primary                                                                                                            | 1.0 MB  00:00:00
Determining fastest mirrors
 * base: mirror.cs.uwp.edu
 * epel: mirror.rnet.missouri.edu
 * extras: mirrors.usinternet.com
 * remi-php71: repo1.dal.innoscale.net
 * remi-safe: repo1.dal.innoscale.net
 * updates: bay.uchicago.edu
gitlab_gitlab-ee                                                                                                                                                  261/261
Resolving Dependencies
--> Running transaction check
---> Package nmap-ncat.x86_64 2:6.40-7.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================
 Package                                  Arch                                  Version                                      Repository                            Size
==========================================================================================================================================================================
Installing:
 nmap-ncat                                x86_64                                2:6.40-7.el7                                base                                201 k

Transaction Summary
==========================================================================================================================================================================
Install  1 Package

Total download size: 201 k
Installed size: 414 k
Is this ok [y/d/N]: y
Downloading packages:
nmap-ncat-6.40-7.el7.x86_64.rpm                                                                                                                    | 201 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                                                          1/1
  Verifying  : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                                                          1/1

Installed:
  nmap-ncat.x86_64 2:6.40-7.el7

Complete!
[michael@box1 ~]$


pan64 07-29-2017 09:01 AM

there is no such thing. I mean for example the base package contains a lot of commands. Others contain a toolset, and finally the creator of the package can give any name (s)he wants.

NotionCommotion 07-29-2017 09:51 AM

Thanks pan64. Gotcha. How can one tell what commands come with a package?

knudfl 07-29-2017 09:56 AM

Commands :

RPM package : $ rpm -ql <package-name> | grep bin





-

AwesomeMachine 07-29-2017 09:52 PM

You can also look in the documentation for the package.

NotionCommotion 07-29-2017 10:50 PM

Quote:

Originally Posted by AwesomeMachine (Post 5741564)
You can also look in the documentation for the package.

Wish I could! But how do I find the documentation?

man nmap-ncat.x86_64?
man nmap-ncat?

Nope

knudfl 07-30-2017 03:56 AM

$ man nc
$ man ncat

Code:

$ rpm -ql nmap-ncat

/usr/bin/nc
/usr/bin/ncat
/usr/share/doc/nmap-ncat-6.40
/usr/share/doc/nmap-ncat-6.40/AUTHORS
/usr/share/doc/nmap-ncat-6.40/COPYING
/usr/share/doc/nmap-ncat-6.40/README
/usr/share/doc/nmap-ncat-6.40/THANKS
/usr/share/doc/nmap-ncat-6.40/examples
/usr/share/doc/nmap-ncat-6.40/examples/README
/usr/share/doc/nmap-ncat-6.40/examples/ipaccess
/usr/share/doc/nmap-ncat-6.40/examples/logs
/usr/share/doc/nmap-ncat-6.40/examples/logs/ascii-output
/usr/share/doc/nmap-ncat-6.40/examples/logs/hex-output
/usr/share/doc/nmap-ncat-6.40/examples/scripts
/usr/share/doc/nmap-ncat-6.40/examples/scripts/README
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-proxy
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan/README
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan/get.request
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan/iplist
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan/scan-example
/usr/share/doc/nmap-ncat-6.40/examples/scripts/http-scan/scanner-output
/usr/share/man/man1/nc.1.gz
/usr/share/man/man1/ncat.1.gz


pan64 07-30-2017 04:37 AM

Quote:

Originally Posted by NotionCommotion (Post 5741578)
Wish I could! But how do I find the documentation?

man pages available on the net, and that package also have a homepage.
https://linux.die.net/man/1/nc
https://nmap.org/ncat/
You can always google...

Trihexagonal 07-30-2017 06:29 AM

Netcat Users' Guide

You risk opening a hole on your system fiddling around with programs you don't understand like netcat.

tshikose 07-30-2017 08:06 AM

Quote:

Originally Posted by NotionCommotion (Post 5741578)
Wish I could! But how do I find the documentation?

man nmap-ncat.x86_64?
man nmap-ncat?

Nope

Code:

rpm -qd nmap-ncat

AwesomeMachine 07-30-2017 08:11 AM

Quote:

Originally Posted by NotionCommotion (Post 5741578)
Wish I could! But how do I find the documentation?

/usr/share/doc

AwesomeMachine 07-30-2017 08:13 AM

Quote:

Originally Posted by Trihexagonal (Post 5741681)
You risk opening a hole on your system fiddling around with programs you don't understand like netcat.

I think it might suffice to say not to use netcat over the public Internet.

Trihexagonal 07-30-2017 08:37 AM

Quote:

Originally Posted by AwesomeMachine (Post 5741709)
I think it might suffice to say not to use netcat over the public Internet.

It would suffice, I only told them why it's not a good idea.

NotionCommotion 07-31-2017 08:09 AM

Quote:

Originally Posted by Trihexagonal (Post 5741681)
Netcat Users' Guide

You risk opening a hole on your system fiddling around with programs you don't understand like netcat.

Quote:

Originally Posted by AwesomeMachine (Post 5741709)
I think it might suffice to say not to use netcat over the public Internet.

Quote:

Originally Posted by Trihexagonal (Post 5741714)
It would suffice, I only told them why it's not a good idea.

Never, or not until the program is understood? Any specific vulnerabilities one should be on the lookout for? Thanks

Trihexagonal 07-31-2017 10:09 AM

Quote:

Originally Posted by NotionCommotion (Post 5742092)
Never, or not until the program is understood? Any specific vulnerabilities one should be on the lookout for? Thanks

I was referring to opening ports. Ports you might not be aware you're opening that someone could access and looking out for your best interest.

If I were you I would study docs thoroughly to become familiar with its many functions before using it.

In addition to the Users Guide I linked to, where they reference it as "your network Swiss Army knife", there are several articles online about its use. This is just one:

http://xmodulo.com/useful-netcat-examples-linux.html


All times are GMT -5. The time now is 07:43 PM.