In practice, they will both make you the superuser. However, they do slightly different things, in slightly different ways.
First, su -
switches you to a login shell, whereas sudo -s
does not. In practice, this often means that your environment variables will not be switch to root
's for sudo -s
. Note that you can run just su
to not get a login shell, or sudo -i
to get a login shell [not in all versions].
Secondly, su
and su -
switch to a new user by asking you to authenticate as the new user. sudo -s
and sudo -i
(and just regular sudo foo
) let you run a command for which you're pre-authorized [see /etc/sudoers
], possibly by asking you to confirm your current ID.
If you want to be really cute, you can also run sudo su -
, which will request to login as root (su -
) run by the root user (the sudo
part).
If the root user is locked (such as on Ubuntu), you will not be able to login as root using su
. In this case, you'll need to use sudo -s
or sudo -i
Best Answer
gvfs-trash
is part of GNOME's Gvfs, whiletrash-cli
is a separate set of tools independent of the desktop environment. Both programs implement the XDG Trash specification and should be compatible with each other. For example, you can trash files withgvfs-trash
or GNOME Nautilus, then restore fromtrash-restore
or KDE.