Trace: » debian02.html

[hemmerling] Debian Linux 2/4

General Linux / Unix Commands

chmod

Command Examples

Resources

su, "su -" and sudo

PATH on Debian Linux

  • Default user:
    $printenv
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    
  • su ( root ):
    $su
    $printenv
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    
  • su - ( root ):
    $su -
    $printenv
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    

Add a user "USERNAME" to the "sudo" group, as first and only user

$su -
Password:
# $apt install sudo
$usermod -aG sudo USERNAME
$getent group sudo

Alternative ( unnecessary complex ? ) Instructions for Debian 10.7

  • Add the USERNAME ( of the user as which you are logged in ) to the group “sudoers”.
    1. ( Open a terminal ).
    2. su root
    3. ( Input root password. root is already member of the group “sudoers” :-) ).
    4. apt-get install sudo -y
    5. su -
    6. adduser username sudo
    7. logout
    8. chmod 0440 /etc/sudoers
    9. exit
    10. sudo reboot
    11. ( Input root password ).
    12. ( reboot manually if “sudo reboot” doesn't work )

How to become "root" on Debian Live Installation

  • “sudo su” & lowercase ( ”-L” ) or lowercase ( ”- -Login” ):
    sudo su -l
    sudo su --login
    

Resources

mount & umount

Untested

Forgotten root Password


When this document changes ! Site Navigation ( My Business ! My Topics ! Imprint / Contact ! Privacy Policy ! Keyword Index ! ! Google+ Publisher "hemmerling" )

 
en/debian02.html.txt · Last modified: 2025/08/03 10:13 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki