backup config files

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    10 hours ago

    You copy paste the command.

    $ sudo apt update
    -bash: sudo: command not found
    $
    

    Your distro doesn’t set up/install sudo by default, so your first task is installing sudo, then understanding /etc/sudoers syntax and understanding why the command to atomically replace /etc/sudoers is visudo and why on a multiuser system there’s value to atomic replacement. In the meantime, you probably learn about su and maybe, if your distro has disabled them, how to enable switching to the kernel virtual consoles on tty1 through tty7 so that in the meantime, you can do things as root while staying logged in. Also, you’re going to learn about environment variables, so as to set EDITOR, and where your shell config files live, what a login shell is, and in what shells ~/.bash_profile, ~/.profile, and ~/.bashrc run. Also, you first try running visudo as a regular user, but your distro places visudo in /usr/sbin instead of /usr/bin, so you can’t figure out why it’s not installed and are going to learn about the FHS and mlocate and updatedb so that you can find /usr/sbin/visudo and dpkg -S so that you can figure out which package it’s in and confirm that it’s actually installed and learn about PATH.