Dnf For Mac

Posted on

Install Git on Mac OS X

  1. On your Mac, choose Apple menu System Preferences, then click Network. Open Network preferences for me. Select the service you use to connect to the internet (such as Ethernet) in the list at the left. Make sure the IP address for the DNS server you want to use is entered correctly in the DNS Server field.
  2. Dnf install git-cola. Mac OS X Follow the installation notes in the README.md file. Windows Download the git-cola installer and follow the installation notes.

There are several ways to install Git on a Mac. In fact, if you've installed XCode (or it's Command Line Tools), Git may already be installed. To find out, open a terminal and enter git --version.

Alias Examples dnf alias list. Lists all defined aliases. Dnf alias add rm=remove. Adds a new command alias called rm which works the same as the remove command. Dnf alias add upgrade='upgrade -skip-broken-disableexcludes=all -obsoletes'. Adds a new command alias called upgrade which works the same as the upgrade command, with additional options. Note that the original upgrade command is. We worked with MSFT Support and they provided a registry key to grey out the DNF option in the Permission drop down however this is only available for PC's. They said there is no current method to make that option not available on a Mac but that they would entertain a feature request (perhaps through the user voice sites). After digging through some steps by spam-filter and borrowing from Windows-based tutorials. I successfully found a way to get mods to run on Mac OS X. NOTE: I have no idea if this will run across ALL mods, but I got it to work for 2 of the more infamous mods - DNF 2013 and Duke Forces.

Apple actually maintain and ship their own fork of Git, but it tends to lag behind mainstream Git by several major versions. You may want to install a newer version of Git using one of the methods below:

Git for Mac Installer

The easiest way to install Git on a Mac is via the stand-alone installer:

  1. Download the latest Git for Mac installer.

  2. Follow the prompts to install Git.

  3. Open a terminal and verify the installation was successful by typing git --version:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install Git with Homebrew

If you have installed Homebrew to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and install Git using Homebrew:

  2. Verify the installation was successful by typing which git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  4. (Optional) To make Git remember your username and password when working with HTTPS repositories, install the git-credential-osxkeychain helper.

Install Git with MacPorts

If you have installed MacPorts to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and update MacPorts:

  2. Search for the latest available Git ports and variants:

  3. Install Git with bash completion, the OS X keychain helper, and the docs:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install the git-credential-osxkeychain helper

Bitbucket supports pushing and pulling your Git repositories over both SSH and HTTPS. To work with a private repository over HTTPS, you must supply a username and password each time you push or pull. The git-credential-osxkeychain helper allows you to cache your username and password in the OSX keychain, so you don't have to retype it each time.

  1. If you followed the MacPorts or Homebrew instructions above, the helper should already be installed. Otherwise you'll need to download and install it. Open a terminal window and check:

    If you receive a usage statement, skip to step 4. If the helper is not installed, go to step 2.

  2. Use curl to download git-credential-osxkeychain (or download it via your browser) and move it to /usr/local/bin:

  3. Make the file an executable:

  4. Configure git to use the osxkeychain credential helper.

    The next time Git prompts you for a username and password, it will cache them in your keychain for future use.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Mac, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Build Git from source on OS X

Building Git can be a little tricky on Mac due to certain libraries moving around between OS X releases. On El Capitan (OS X 10.11), follow these instructions to build Git:

  1. From your terminal install XCode's Command Line Tools (if you haven't already):

  2. Install Homebrew.

  3. Using Homebrew, install openssl:

  4. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  5. To build Git run make with the following flags:

Install Git on Windows

Git for Windows stand-alone installer

  1. Download the latest Git for Windows installer.

  2. When you've successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.

  3. Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

  4. Run the following commands to configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. Optional: Install the Git credential helper on Windows

    Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. You can store these credentials, instead of supplying the combination every time, with the Git Credential Manager for Windows.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Windows, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Install Git on Linux

Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get:

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

Fedora (dnf/yum)

Git packages are available via both yum and dnf:

  1. From your shell, install Git using dnf (or yum, on older versions of Fedora):

    or

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create

Build Git from source on Linux

Debian / Ubuntu

Git requires the several dependencies to build on Linux. These are available via apt:

  1. From your shell, install the necessary dependencies using apt-get:

  2. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  3. To build Git and install it under /usr, run make:

Fedora

Git requires the several dependencies to build on Linux. These are available via both yum and dnf:

  1. From your shell, install the necessary build dependencies using dnf (or yum, on older versions of Fedora):

    or using yum. For yum, you may need to install the Extra Packages for Enterprise Linux (EPEL) repository first:

  2. Symlink docbook2X to the filename that the Git build expects:

  3. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  4. To build Git and install it under /usr, run make:

Next up:

Setting up a repository

Start next tutorial

DNF Commands

DNF Command Examples

What is DNF?


DNF (Dandified Yum) is the next generation of the yum (Yellowdog Update Modified) package manager. DNF was created as an improvement to the yum package manager, addressing performance, memory and dependency resolution issues. It is intended that DNF will eventually replace the yum package manager that is currently found on RPM based systems. DNF was first introduced in Fedora 18 and is now the default package manager for Fedora 25.


DNF Command Examples


Below are some examples of using DNF to install, remove, update packages on your Linux system. Examples below were all carried out on a Fedora Linux Server.


Display DNF Version


Basic Syntax: dnf --version


The above command is used to display the currently installed version of DNF.


Displaying Repositories - dnf repolist


Basic Syntax: dnf repolist


The command 'dnf repolist' will display all enabled repositories. You may pass an additional parameter of 'all' to display enabled and disabled repositories.


Listing Installed Packages - dnf list installed


Basic Syntax: dnf list installed


This command will display all installed packages on your system. The above output is only an extract of the information displayed.

Displaying Available and Installed packages - dnf list


Basic Syntax: dnf list


In the above example, we can see both 'Installed Packages' and 'Available Packages'. (The above output is an extract of the full output).


Display Available packages only - dnf list available


Basic Syntax: dnf list available


In the above example we used the 'dnf list available' command to list only available packages.


Display Package Information - dnf info


Basic Syntax: dnf info package name


The above command displays information about the specified package. Release/version and architecture information is given along with a handy link to the package website.




Searching for a package - dnf search


Basic Syntax: dnf search pattern


In the above example we searched for any packages that contained the pattern 'htop'. This option is useful if you do not know the full name of the package. This option searches package metadata for the specified keywords.


dnf provides


Basic Syntax: dnf provides provide-spec
Displays what package provides the specified file.


Installing Packages - dnf install


Basic Syntax: dnf install package name
The 'dnf install' command is used to install the specified package. Any dependencies are displayed and then installed for the specified package.


Reinstalling a Package - dnf reinstall


Basic Syntax: dnf reinstall package name
The 'dnf reinstall' command is used to reinstall the specified package.


Updating specific packages - dnf update


Basic Syntax: dnf update package name
The 'dnf update' command is used to update specific packages. Before using the update option, it is useful to check the current version of the package and check to see whether a newer version is available. To do this we use the 'dnf list' command to show the currently installed version and any versions that are available.


From the above output we can see that the package 'zip.X86_64' is at version '3.0-13.fc22' and an updated version '3.0-14.fc22' is available. To update this package, we use the 'dnf update' command:

Dnf For Mac Download


Downgrading a Package - dnf downgrade


Basic Syntax: dnf downgrade package name
The 'dnf downgrade' command is used to downgrade the specified packages to the highest of all known lower versions if possible. In the following example, we will downgrade the previously updated package 'zip.x86_64'. To establish the current version of the package we used the command 'dnf list'.


Removing a Package - dnf remove


Basic Syntax: dnf remove package name
The 'dnf remove' command is used to remove a specified package. You may also use the 'erase' option, however, 'erase' has now been deprecated.


Checking for system updates - dnf check-update


Dnf Machine

Basic Syntax: dnf check-update
The 'dnf check-update' command is used to check for available updates on your Linux system. The 'check-update' checks for any available updates of the specified packages. If no package name(s) are given then it will check for all updates available to your system. (Below is a small extract from the 'dnf check-update' command).


Listing Available Updates - dnf list updates


Basic Syntax: dnf list updates
The 'dnf list updates' command is used to list any available updates available to your system. Can be used as an alternative to the above 'check-update' command. (Below is a small extract from the output).


Update all Packages - dnf update


Basic Syntax: dnf update
The 'dnf update' command is used to update all packages on your system. Individual packages may be specified. Where no packages are specified, all packages will be updated providing newer packages are available. (Below is a small extract of output from the 'update' command.


Tidying Up - dnf autoremove


Basic Syntax: dnf autoremove
The 'dnf autoremove' command is used to removes all 'leaf' packages from the your system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Any packages that can be removed will be displayed. You will be required to confirm the removal of the packages.


Working with Package Groups - dnf grouplist


Many packages are grouped together into convenient groups. This allows a system administrator to install a group of packages with one single command. The command 'dnf grouplist' can be used to display available groups on your system. (Below is an extract of the 'grouplist' command).


Install a Group of Packages - dnf groupinstall groupname


In the example below we are going to install numerous editing tools that are available. To install all the available 'Editors' we issue the command 'dnf groupinstall Editors'. (Please note, if the group package contains spaces within its name, then you must place single quotes around the group name.)


Update a Group of Packages - dnf groupupdate groupname


In the example below we are going to update all packages within the group 'Editors'. In this example, no updates were currently available.


Mac

Remove a Group of Packages - dnf groupremove groupname


In the example below we are going to remove a group. To remove the group 'Editors', the command 'dnf groupremove Editors' is used. (Please note, if the group package contains spaces within its name, then you must place single quotes around the group name).


Synchronise All Packages - dnf distro-sync


'dnf distro-sync' will upgrade or downgrade all packages to the latest versions that are available from any enabled repository.


Clean temporary Files - dnf clean


Basic Syntax: dnf clean option
The 'dnf clean' command is used to perform a cleanup of temporary files for any currently enabled repositories on your Linux system. Various options are available to carry out specific functions. 'dnf clean all' will carry out all of the options.
dnf clean dbcache
Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run.
dnf clean expire-cache
Removes local cookie files saying when the metadata and mirrorlists were downloaded for each repo. DNF will re-validate the cache for each repo the next time it is used.
dnf clean metadata
Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this option will make DNF download all the metadata the next time it is run.
dnf clean packages
Removes any cached packages from the system.
dnf clean plugins
Tells all enabled plugins to eliminate their cached data.
dnf clean all
Carries out all of the above.


Displaying Transaction History


Basic Syntax: dnf history
The 'dnf history' command is used to display transactions that have happened in the past.

Dnf Install Package


Getting Help with DNF


Basic Syntax: dnf help command
The 'dnf help' command is used to display a list of available commands. You may also specify a command after the 'help' option to display specific information. Below are some examples of the 'dnf help' command in use. For full details of the options available to the 'dnf' command, you can consult the man pages for dnf by issuing the command 'man dnf'. Another useful command is 'man yum2dnf'. This man page displays the differences between the 'yum' package manager and 'dnf'.

Dnf Package Manager