I switch from debian to fedora and althogh reading wikis and mans etc. I get caught on dnf where I do not find answers…
When I use e.g. ‘dnf se nextcloud’ there is a lot of output - but I can’t see whether the package is installed or not (like aptitude search nextcloud would tell me). Is there a switch for it?
And for selection package I used something like ‘aptitude search nextcloud|grep ^i’ in the past for (only) seeing, what packages including ‘nextcloud’ are installed. How would this possible with dnf?
Is it possible to shorten the list of ‘dnf se’ only for the excatly matches (or the other possibilities)?
Man pages are a very good source, but honestly I almost always look for a nice example and just after I check what all the parameters are for. So here my hints:
hint rpm
rpm
# To install a package:
rpm -ivh <rpm>
# To remove a package:
rpm -e <package>
# To find what package installs a file:
rpm -qf </path/to/file>
# To find what files are installed by a package:
rpm -ql <package>
rpm -qpl <rpm>
# To find what packages require a package or file:
rpm -q --whatrequires <package>
rpm -q --whatrequires <file>
# To list all installed packages:
rpm -qa
hint does not seem to be a command in the Fedora repos, though. Where can one find this package? (dnf whatprovides '/usr/bin/hint' doesn’t return anything here on F34)
There’s really no shortage of docs on the web etc. about most commands. The man pages just tend to be the authoritative source of information (along with info docs).
It is not … no … but as I said examples bring me faster to the point as trail and fail with man pages. They are very well as you said no doubts.
About hint this is a script i found while learning bash. It was named cheat as cheat-sheet. I believe that I not cheat while looking up in my or others notes. So for learning bash and to see how the scripts work i made my own version based on an existing script.
And dnf list "*nextcloud*" will list packages which include the given string (in this case, nextcloud) in their name and whether they are installed or not.
It generates man pages from Fedora rawhide; this makes it a good choice for Fedora derived distributions. It has a github repo for holding extra man pages beyond what is in Fedora rawhide.