mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-30 23:38:18 +00:00
Added 2 new Quick Reference articles.
This commit is contained in:
parent
9730ab501e
commit
20c6837213
2 changed files with 441 additions and 0 deletions
222
modules/ROOT/pages/dnf-package-manager-quick-reference.adoc
Normal file
222
modules/ROOT/pages/dnf-package-manager-quick-reference.adoc
Normal file
|
@ -0,0 +1,222 @@
|
||||||
|
= DNF Package Manager Quick Reference
|
||||||
|
Peter Boy (pboy) ; The Fedora Docs Team
|
||||||
|
:revnumber: F37 onwards
|
||||||
|
:revdate: 2023-08-29
|
||||||
|
:category: Administration
|
||||||
|
:tags: How-to, DNF, Quick Reference
|
||||||
|
|
||||||
|
This sections lists the most useful commands provided by the *dnf* utility. For a complete list of commands, options, and their syntax, see the *dnf*(8) man page.
|
||||||
|
|
||||||
|
*dnf help _command_*:: Displays detailed information about a command.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
$ *dnf help _upgrade_*
|
||||||
|
upgrade [PACKAGE...]
|
||||||
|
|
||||||
|
upgrade a package or packages on your system
|
||||||
|
alias: update
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf upgrade*:: Upgrades all packages on the system to the latest version available.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf upgrade*
|
||||||
|
Last metadata expiration check: 1:09:32 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
Dependencies resolved.
|
||||||
|
Nothing to do.
|
||||||
|
Complete!
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf upgrade _package_name_*:: Upgrades a package to the latest version available.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf upgrade _dia_*
|
||||||
|
Last metadata expiration check: 1:11:26 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
Dependencies resolved.
|
||||||
|
Nothing to do.
|
||||||
|
Complete!
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf install _package_name_*:: Installs a package.
|
||||||
|
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf install _dia_*
|
||||||
|
Last metadata expiration check: 1:07:19 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
Dependencies resolved.
|
||||||
|
=============================================================================
|
||||||
|
Package Arch Version Repository Size
|
||||||
|
=============================================================================
|
||||||
|
Installing:
|
||||||
|
dia x86_64 1:0.97.3-5.fc24 fedora 4.2 M
|
||||||
|
libart_lgpl x86_64 2.3.21-15.fc25 fedora 71 k
|
||||||
|
|
||||||
|
Transaction Summary
|
||||||
|
=============================================================================
|
||||||
|
Install 2 Packages
|
||||||
|
|
||||||
|
Total download size: 4.2 M
|
||||||
|
Installed size: 18 M
|
||||||
|
Is this ok [y/N]: *y*
|
||||||
|
[... output truncated ...]
|
||||||
|
Installed:
|
||||||
|
dia.x86_64 1:0.97.3-5.fc24 libart_lgpl.x86_64 2.3.21-15.fc25
|
||||||
|
|
||||||
|
Complete!
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf remove _package_name_*:: Uninstalls a package.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf remove _dia_*
|
||||||
|
Dependencies resolved.
|
||||||
|
=============================================================================
|
||||||
|
Package Arch Version Repository Size
|
||||||
|
=============================================================================
|
||||||
|
Removing:
|
||||||
|
dia x86_64 1:0.97.3-5.fc24 @fedora 18 M
|
||||||
|
libart_lgpl x86_64 2.3.21-15.fc25 @fedora 126 k
|
||||||
|
|
||||||
|
Transaction Summary
|
||||||
|
=============================================================================
|
||||||
|
Remove 2 Packages
|
||||||
|
|
||||||
|
Installed size: 18 M
|
||||||
|
Is this ok [y/N]: *y*
|
||||||
|
[... output truncated ...]
|
||||||
|
Removed:
|
||||||
|
dia.x86_64 1:0.97.3-5.fc24 libart_lgpl.x86_64 2.3.21-15.fc25
|
||||||
|
|
||||||
|
Complete!
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf check-update*:: Checks if any updates are available for all packages in the enabled repositories.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
389-ds-base.x86_64 1.3.7.5-11.el7 @updates
|
||||||
|
389-ds-base-libs.x86_64 1.3.7.5-11.el7 @updates
|
||||||
|
NetworkManager.x86_64 1:1.10.2-3.el7 @updates
|
||||||
|
NetworkManager-config-server.noarch 1:1.10.2-3.el7 @updates
|
||||||
|
[... output truncated ...]
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf search _keyword_*:: Search package metadata in the enabled repositories for the specified keyword. By default, the commands searches only in package names and summaries.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf search _freeipa_*
|
||||||
|
Last metadata expiration check: 1:12:31 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
========================================================================
|
||||||
|
freeipa-client.x86_64 : IPA authentication for use on clients
|
||||||
|
freeipa-common.noarch : Common files used by IPA
|
||||||
|
freeipa-server.x86_64 : The IPA authentication server
|
||||||
|
freeipa-server-dns.noarch : IPA integrated DNS server with support for automatic DNSSEC signing
|
||||||
|
freeipa-client-common.noarch : Common files used by IPA client
|
||||||
|
freeipa-python-compat.noarch : Compatiblity package for Python libraries used by IPA
|
||||||
|
freeipa-server-common.noarch : Common files used by IPA server
|
||||||
|
freeipa-server-trust-ad.x86_64 : Virtual package to install packages required for Active Directory trusts
|
||||||
|
libsss_idmap.x86_64 : FreeIPA Idmap library
|
||||||
|
[... output truncated ...]
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf info _package_name_*:: Shows details for a package.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
[root@localhost ~]# *dnf info _freeipa-server_*
|
||||||
|
Last metadata expiration check: 1:13:14 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
Available Packages
|
||||||
|
Name : freeipa-server
|
||||||
|
Arch : x86_64
|
||||||
|
Epoch : 0
|
||||||
|
Version : 4.4.4
|
||||||
|
Release : 1.fc25
|
||||||
|
Size : 380 k
|
||||||
|
Repo : updates
|
||||||
|
Summary : The IPA authentication server
|
||||||
|
URL : https://www.freeipa.org/
|
||||||
|
License : GPLv3+
|
||||||
|
Description : IPA is an integrated solution to provide centrally managed Identity (users,
|
||||||
|
: hosts, services), Authentication (SSO, 2FA), and Authorization
|
||||||
|
: (host access control, SELinux user roles, services). The solution provides
|
||||||
|
: features for further integration with Linux based clients (SUDO, automount)
|
||||||
|
: and integration with Active Directory based infrastructures (Trusts).
|
||||||
|
: If you are installing an IPA server, you need to install this package.
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
*dnf provides _command_or_file_*:: Shows which package provides the specified command or file.
|
||||||
|
+
|
||||||
|
To specify a command:
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf provides */_ipa-server-install_*
|
||||||
|
Last metadata expiration check: 1:14:12 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
freeipa-server-4.4.1-1.fc25.x86_64 : The IPA authentication server
|
||||||
|
Repo : fedora
|
||||||
|
|
||||||
|
freeipa-server-4.4.4-1.fc25.x86_64 : The IPA authentication server
|
||||||
|
Repo : updates
|
||||||
|
----
|
||||||
|
+
|
||||||
|
To specify a file:
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf provides _/etc/sssd/sssd.conf_*
|
||||||
|
Last metadata expiration check: 1:14:58 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
sssd-common-1.16.0-4.fc25.x86_64 : Common files for the SSSD
|
||||||
|
Repo : @System
|
||||||
|
|
||||||
|
sssd-common-1.16.0-4.fc25.x86_64 : Common files for the SSSD
|
||||||
|
Repo : updates
|
||||||
|
|
||||||
|
sssd-common-1.14.2-1.fc25.i686 : Common files for the SSSD
|
||||||
|
Repo : fedora
|
||||||
|
|
||||||
|
sssd-common-1.14.2-1.fc25.x86_64 : Common files for the SSSD
|
||||||
|
Repo : fedora
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf history*:: Displays a report of the past transactions.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf history*
|
||||||
|
ID | Command line | Date and time | Action(s) | Altered
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
9 | update -y | 2017-10-17 12:35 | I, U | 17 EE
|
||||||
|
8 | install midori | 2017-10-13 10:44 | Install | 3 >
|
||||||
|
7 | update -y | 2017-10-12 15:59 | Update | 7
|
||||||
|
6 | install keepass | 2017-10-11 13:40 | Install | 13 <
|
||||||
|
5 | install thunderbird | 2017-10-10 16:33 | Install | 1 >
|
||||||
|
4 | install sssd krb5-workst | 2017-10-10 15:30 | Install | 3 >
|
||||||
|
3 | install xchat | 2017-10-10 15:19 | Install | 4
|
||||||
|
2 | update | 2017-10-10 13:44 | I, O, U | 752 EE
|
||||||
|
1 | | 2017-10-10 13:34 | Install | 1373 EE
|
||||||
|
----
|
||||||
|
|
||||||
|
*dnf list installed*:: Lists all packages installed on the system.
|
||||||
|
+
|
||||||
|
[literal,subs="+quotes,attributes"]
|
||||||
|
----
|
||||||
|
# *dnf list installed*
|
||||||
|
Last metadata expiration check: 1:17:33 ago on Thu Dec 14 09:20:48 2017.
|
||||||
|
Installed Packages
|
||||||
|
GConf2.x86_64 3.2.6-16.fc24 @anaconda
|
||||||
|
GeoIP.x86_64 1.6.11-1.fc25 @updates
|
||||||
|
GeoIP-GeoLite-data.noarch 2017.10-1.fc25 @updates
|
||||||
|
ImageMagick.x86_64 6.9.9.19-1.fc25 @updates
|
||||||
|
ImageMagick-libs.x86_64 6.9.9.19-1.fc25 @updates
|
||||||
|
LibRaw.x86_64 0.17.2-2.fc25 @updates
|
||||||
|
ModemManager.x86_64 1.6.4-1.fc25 @updates
|
||||||
|
ModemManager-glib.x86_64 1.6.4-1.fc25 @updates
|
||||||
|
NetworkManager.x86_64 1:1.4.6-1.fc25 @updates
|
||||||
|
[... output truncated ...]
|
||||||
|
----
|
219
modules/ROOT/pages/network-manager-quick-reference.adoc
Normal file
219
modules/ROOT/pages/network-manager-quick-reference.adoc
Normal file
|
@ -0,0 +1,219 @@
|
||||||
|
= Network Manager Quick Reference
|
||||||
|
Peter Boy (pboy); The Fedora Docs Team
|
||||||
|
:revnumber: F37 onwards
|
||||||
|
:revdate: 2023-08-29
|
||||||
|
:category: Administration
|
||||||
|
:tags: How-to, Network, NetworkManager, Quick Refeence
|
||||||
|
//:page-aliases:
|
||||||
|
|
||||||
|
|
||||||
|
== NetworkManager status
|
||||||
|
|
||||||
|
Overall status of NetworkManager::
|
||||||
|
+
|
||||||
|
----
|
||||||
|
$ nmcli general status
|
||||||
|
----
|
||||||
|
|
||||||
|
Display active connections::
|
||||||
|
----
|
||||||
|
$ nmcli connection show --active
|
||||||
|
----
|
||||||
|
|
||||||
|
Display all configured connections::
|
||||||
|
----
|
||||||
|
$ nmcli connection show configured
|
||||||
|
----
|
||||||
|
|
||||||
|
== Connect/disconnect to an already configured connection
|
||||||
|
|
||||||
|
Connect to a configured connection by name::
|
||||||
|
----
|
||||||
|
$ nmcli connection up id <connection_name>
|
||||||
|
----
|
||||||
|
|
||||||
|
Disconnection by name::
|
||||||
|
----
|
||||||
|
$ nmcli connection down id <connection_name>
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
== Wi-Fi
|
||||||
|
|
||||||
|
Get Wi-Fi status::
|
||||||
|
----
|
||||||
|
$ nmcli radio wifi
|
||||||
|
----
|
||||||
|
|
||||||
|
Turn Wi-Fi on or off::
|
||||||
|
----
|
||||||
|
$ nmcli radio wifi _on|off_
|
||||||
|
----
|
||||||
|
|
||||||
|
Available access points (AP)::
|
||||||
|
----
|
||||||
|
$ nmcli device wifi list
|
||||||
|
----
|
||||||
|
|
||||||
|
Refresh the previous list::
|
||||||
|
----
|
||||||
|
$ nmcli device wifi rescan
|
||||||
|
----
|
||||||
|
|
||||||
|
Create a new connection to an open AP::
|
||||||
|
----
|
||||||
|
$ nmcli device wifi connect <SSID|BSSID>
|
||||||
|
----
|
||||||
|
|
||||||
|
Create a new connection to a protected AP::
|
||||||
|
----
|
||||||
|
$ nmcli device wifi connect <SSID|BSSID> password <password>
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
== Network interfaces
|
||||||
|
|
||||||
|
List available devices and their status::
|
||||||
|
----
|
||||||
|
$ nmcli device status
|
||||||
|
----
|
||||||
|
|
||||||
|
Disconnect an interface::
|
||||||
|
----
|
||||||
|
$ nmcli device disconnect iface <interface>
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
== Create or modify a connection
|
||||||
|
|
||||||
|
To create a new connection using an interactive editor
|
||||||
|
----
|
||||||
|
$ nmcli connection edit con-name <name_of_new_connection>
|
||||||
|
----
|
||||||
|
|
||||||
|
To edit an already existing connection using an interactive editor:
|
||||||
|
----
|
||||||
|
$ nmcli connection edit <connection_name>
|
||||||
|
----
|
||||||
|
|
||||||
|
[[exampletutorial]]
|
||||||
|
=== Example/Tutorial
|
||||||
|
|
||||||
|
Create a new connection:
|
||||||
|
----
|
||||||
|
$ nmcli connection edit con-name _name of new connection_
|
||||||
|
----
|
||||||
|
|
||||||
|
It asks us to define a connection type:
|
||||||
|
----
|
||||||
|
Valid connection types: 802-3-ethernet (ethernet), 802-11-wireless (wifi), wimax, gsm, cdma, infiniband, adsl, bluetooth, vpn, 802-11-olpc-mesh (olpc-mesh), vlan, bond, team, bridge, bond-slave, team-slave, bridge-slave
|
||||||
|
Enter connection type:
|
||||||
|
----
|
||||||
|
|
||||||
|
In this example, we use ethernet:
|
||||||
|
----
|
||||||
|
Enter connection type: ethernet
|
||||||
|
----
|
||||||
|
|
||||||
|
The following message appears, note that `nmcli>` is a prompt and that it lists the main settings available:
|
||||||
|
----
|
||||||
|
===| nmcli interactive connection editor |===
|
||||||
|
|
||||||
|
Adding a new '802-3-ethernet' connection
|
||||||
|
|
||||||
|
Type 'help' or '?' for available commands.
|
||||||
|
Type 'describe [<setting>.<prop>]' for detailed property description.
|
||||||
|
|
||||||
|
You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, ipv4, ipv6
|
||||||
|
nmcli>
|
||||||
|
----
|
||||||
|
|
||||||
|
Edit the setting `ipv4`:
|
||||||
|
----
|
||||||
|
nmcli> goto ipv4
|
||||||
|
----
|
||||||
|
|
||||||
|
Note that after this our prompt has changed to indicate that we are currently editing the `ipv4` setting:
|
||||||
|
----
|
||||||
|
nmcli ipv4>
|
||||||
|
----
|
||||||
|
|
||||||
|
List available properties under the `ipv4` setting and describe the `method` property:
|
||||||
|
----
|
||||||
|
nmcli ipv4> describe
|
||||||
|
|
||||||
|
Available properties: method, dns, dns-search, addresses, routes, ignore-auto-routes, ignore-auto-dns, dhcp-client-id, dhcp-send-hostname, dhcp-hostname, never-default, may-fail
|
||||||
|
Property name?
|
||||||
|
|
||||||
|
Property name? method
|
||||||
|
----
|
||||||
|
|
||||||
|
Set property `method` to `auto`:
|
||||||
|
----
|
||||||
|
nmcli ipv4> set method auto
|
||||||
|
----
|
||||||
|
|
||||||
|
The `ipv4` setting is now finished. Go back to the main level. Enter the following command until the prompt looks like `nmcli>`:
|
||||||
|
----
|
||||||
|
nmcli ipv4> back
|
||||||
|
----
|
||||||
|
|
||||||
|
To list the main settings again, use the `goto` command without any arguments. After that, press `Enter` and ignore the error.
|
||||||
|
----
|
||||||
|
nmcli> goto
|
||||||
|
|
||||||
|
Available settings: connection, 802-3-ethernet (ethernet), 802-1x, ipv4, ipv6
|
||||||
|
Setting name?
|
||||||
|
----
|
||||||
|
|
||||||
|
It is possible to set a value for a property directly from the main level:
|
||||||
|
----
|
||||||
|
nmcli> set __setting__.__property__ _value_
|
||||||
|
----
|
||||||
|
|
||||||
|
For example:
|
||||||
|
----
|
||||||
|
nmcli> set connection.autoconnect TRUE
|
||||||
|
|
||||||
|
nmcli> set connection.interface-name _interface name this connection is bound to_
|
||||||
|
|
||||||
|
nmcli> set ethernet.cloned-mac-address _Spoofed MAC address_
|
||||||
|
----
|
||||||
|
|
||||||
|
Finally, check the connection details, save and exit:
|
||||||
|
----
|
||||||
|
nmcli> print
|
||||||
|
|
||||||
|
nmcli> save
|
||||||
|
|
||||||
|
nmcli> quit
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
=== Manually editing
|
||||||
|
|
||||||
|
To manually edit an `ifcfg` connection configuration, open or create with a text editor the configuration file of the connection located in `/etc/sysconfig/network-scripts/ifcfg-`.
|
||||||
|
|
||||||
|
A description of most common configuration options is available in the link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-networkscripts-interfaces[RHEL6 Deployment Guide].
|
||||||
|
|
||||||
|
To modify a connection password, open with a text editor and edit the file `keys-` located in `/etc/sysconfig/network-scripts/`. The password is stored in plain text. For example:
|
||||||
|
----
|
||||||
|
$ cat /etc/sysconfig/network-scripts/keys-__connection name__
|
||||||
|
WPA_PSK='password'
|
||||||
|
----
|
||||||
|
|
||||||
|
Or, if using keyfile, simply edit the connection file located inside `/etc/NetworkManager/system-connections/`
|
||||||
|
|
||||||
|
Finally, save the files and to apply changes to an already active connection execute.
|
||||||
|
----
|
||||||
|
nmcli connection up id _connection name_
|
||||||
|
----
|
||||||
|
|
||||||
|
[[delete-a-connection-configuration]]
|
||||||
|
== Delete a connection configuration
|
||||||
|
|
||||||
|
Delete the connection:
|
||||||
|
----
|
||||||
|
nmcli connection delete id <connection_name>
|
||||||
|
----
|
||||||
|
Please note that this also deactivates the connection.
|
Loading…
Reference in a new issue