Monday, December 10, 2012

openSUSE: How to add a repository using zypper

One very easy way of adding a repository (i.e. making the packages in the repository accessible for installation into your system) is to use Yast -> Software repositories.

However, there are times when it may be easier or quicker to use the command line.
Once you know the URI of the repository's ".repo" file, it's a snap:
# zypper addrepo 

For example, to add the "openSUSE Tools" repository:
# zypper addrepo http://download.opensuse.org/repositories/openSUSE:/ \
Tools/openSUSE_12.2/openSUSE:Tools.repo
Adding repository 'openSUSE.org tools (openSUSE_12.2)' \
...........................................[done]
Repository 'openSUSE.org tools (openSUSE_12.2)' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: http://download.opensuse.org/repositories/openSUSE:/Tools/ \
openSUSE_12.2/

Note: "addrepo" can be abbreviated to "ar".



No comments:

Post a Comment