zypper command: How to run as root?

What am I doing wrong here?

What is the proper way to install a package from the terminal using zypper?

daka@linux-0xkw:~> zypper in backintime
Root privileges are required for installing or uninstalling packages.
daka@linux-0xkw:~> su zypper in backintime
su: user zypper does not exist
daka@linux-0xkw:~> kdesu zypper in backintime
daka@linux-0xkw:~> backintime
If 'backintime' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf backintime
daka@linux-0xkw:~> su
Password: 
linux-0xkw:/home/daka # zypper in backintime
Loading repository data...
Reading installed packages...
Resolving package dependencies...


The following 6 NEW packages are going to be installed:
  backintime encfs libboost_serialization1_54_0 librlog5 python-notify sshfs 


The following 2 recommended packages were automatically selected:
  encfs sshfs 


6 new packages to install.
Overall download size: 681.5 KiB. Already cached: 0 B  After the operation, 
additional 3.1 MiB will be used.
Continue? [y/n/? shows all options] (y): y

What is the proper way to install a package from the terminal using zypper?

**sudo **is the way to run console apps with root privileges without becoming root
basicly you should do

sudo zypper in backintime

Thank you. How do you know when to use kdesudo or just sudo?

sudo - runs the program in terminal mode - example: zypper, smartctl, nano, pico, vi, etc.

sudo smartctl -A /dev/sda

sudo zypper refresh

sudo nano /etc/resolv.conf

kdesu - runs programs that require graphics mode. Example: Dolphin, KDE-SystemSettings in root mode.

Install fonts (Windows Fonts - TTF) for all users - KDE - Configure Desktop - Font Management:

kdesu systemsettings

kdesu dolphin (very carefully - you can delete important system files by accident.)**

Thank you. How do you know when to use kdesudo or just sudo?

in my opinion you should only use sudo, kdesu is called by kde when root privileges are needed (for running yast or accessing an external partition in dolphin etc) I do believe that root should use as little GUI as possible.

kdesu not kdesudo is to start a gui app as root in a GUI

sudo, and or su are used for text/command line programs to run as root

sudo is temperate and only effects the following command(s) Also in openSUSE sudo is not a full root environment by default though that can be changed if desired.

su - (note the dash) gives you the full root environment. this starts a root shell and you are root until you exit the shell (ie close window or type exit)
si without dash is like sudo it is part root and part user environment. It so is a root shell but does not have all the paths set that root normally does. What not having full root environment means is that you must use full path names for commands that are in /sbin directory. Also some other environment variables may not be set as full root’s would.

There are other ways to become root. sometimes in a menu item that is to start as root you will see dbus-launch to start the program There are a couple of more even more obscure ways

Read this: https://en.opensuse.org/SDB%3ALogin_as_root

Thanks guys,

That was a very clear explanation.