How To Install Software From the Command Line in SUSE (Like APT in Debian)

Sell your mobile


You like this story?

command-lineIn Debian systems we use apt-get to manage our software from the command line, sometimes this method is easier than installing them through a GUI based package manager. But, apt-get is only for Debian based systems…. then what about others? Yesterday I installed SUSE linux on my system and felt the need of a tool like apt very badly… So I did some research and found out that SUSE have an alternative to apt already installed in it!


What is Zypper?

Zypper is an easy to use command line package manager using the software package management library called libzypp. Zypper is able to manipulate package repositories (like Build Service or standard openSUSE repositories), search for packages, install, remove, or update packages and more. It can be used as standalone application or in scripts or other applications.

How to Use It?

  • Open the terminal (in the bottom panel : Computer > More Applications > (Under “System” group) GNOME Terminal) and type “sudo zypper” followed by the options as shown in the image below :

Update installed packages with newer versions

Update installed packages with newer versions

For What Can We Use Zypper?

In simple terms Zypper is used to manage software applications in your system from the command line. Look at the following options which you can use with zypper, to get a better idea about it :

Usage:

zypper [--global-options] <command> [--command-options] [arguments]

Global Options:

help, -h Help.

version, -V Output the version number.

config, -c <file> Use specified config file instead of the default.

quiet, -q Suppress normal output, print only error messages.

verbose, -v Increase verbosity.

no-abbrev, -A Do not abbreviate text in tables.

table-style, -s Table style (integer).

rug-compatible, -r Turn on rug compatibility.

non-interactive, -n Do not ask anything, use default answers automatically.

xmlout, -x Switch to XML output.

reposd-dir, -D <dir> Use alternative repository definition files directory.

cache-dir, -C <dir> Use alternative meta-data cache directory.

raw-cache-dir <dir> Use alternative raw meta-data cache directory.

Repository Options:

no-gpg-checks Ignore GPG check failures and continue.

plus-repo, -p <URI> Use an additional repository.

disable-repositories Do not read meta-data from repositories.

no-refresh Do not refresh the repositories.

no-cd Ignore CD/DVD repositories.

no-remote Ignore remote repositories.

Target Options:

root, -R <dir> Operate on a different root directory.

disable-system-resolvables Do not read installed packages.

Commands:

help, ? Print help.

shell, sh Accept multiple commands at once.

Repository Management:

repos, lr List all defined repositories.

addrepo, ar Add a new repository.

removerepo, rr Remove specified repository.

renamerepo, nr Rename specified repository.

modifyrepo, mr Modify specified repository.

refresh, ref Refresh all repositories.

clean Clean local caches.

Service Management:

services, ls List all defined services.

addservice, as Add a new service.

modifyservice, ms Modify specified service.

removeservice, rs Remove specified service.

refresh-services, refs Refresh all services.

Software Management:

install, in Install packages.

remove, rm Remove packages.

verify, ve Verify integrity of package dependencies.

source-install, si Install source packages and their build dependencies.

install-new-recommends, inr Install newly added packages recommended by installed packages.

Update Management:

update, up Update installed packages with newer versions.

list-updates, lu List available updates.

patch Install needed patches.

list-patches, lp List needed patches.

dist-upgrade, dup Perform a distribution upgrade.

patch-check, pchk Check for patches.

Querying:

search, se Search for packages matching a pattern.

info, if Show full information for specified packages.

patch-info Show full information for specified patches.

pattern-info Show full information for specified patterns.

product-info Show full information for specified products.

patches, pch List all available patches.

packages, pa List all available packages.

patterns, pt List all available patterns.

products, pd List all available products.

what-provides, wp List packages providing specified capability.

Package Locks:

addlock, al Add a package lock.

removelock, rl Remove a package lock.

locks, ll List current package locks.

cleanlocks, cl Remove unused locks.

Other Commands:

versioncmp, vcmp Compare two version strings.

targetos, tos Print the target operating system ID string.

licenses Print report about licenses and EULAs of installed packages.

Type ‘zypper help <command>’ to get command-specific help.

Do you know anymore tools like apt-get and zypper, which can be used with other Linux distributions? If you do, please feel free to comment about it!


Line Break

Author: Pubudu Kodikara (254 Articles)

Pubudu Kodikara is a writer at Tech Hamlet (www.techhamlet.com), a state of the art tech blog which is powered by the Earth Organization, which have a main target of educating people about the latest technology. They post latest tech news, tips on how to resolve problems, tricks and hacks to improve what you do, tutorials to learn new things and many more.

Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Anti Malware Antivirus anti virus blog blogging Computer Security Contests E-mail Facebook Firefox freeware gmail GNU GRUB Google Google Chrome Graphics internet marketing Internet Security Linux Lucid Lynx Microsoft Microsoft Windows Mozilla Firefox Online Security Open source Operating system Search engine optimization Security social network Social Networking Software System Utilities Tech Hamlet TechHamlet TechHamlet Forums Twitter Ubuntu Utilities Web Web browser Website Web Tools Windows Windows 7 WordPress

© 2009 - 2010 Tech Hamlet (Version 7.1) Sri Lanka