5
resdac
6y

Stuck in a system without sudo, without apt and without a file-editor. Oh gawd where do i begin

Comments
  • 16
  • 1
    The package manager of alpine "apk".
  • 2
    @Linux 'su -' indeed , took me way too long to figure out
  • 1
    How to install packages without yum or apt-get? I always wondered
  • 1
    @growling Compiling from source, or using a platform specific package managemers (apk on alpine, or even the "lower-level package manager" like dpkg or rpm). deb- and rpm-packages an also be extracted manually.
  • 1
    @growling
    apk install
  • 3
    No editor?
    Cat, echo, >>
  • 3
  • 0
    Pacstrap
  • 2
    Fire up a live session and chroot into your hard drive. Something like:

    # mount /dev/sda1 /mnt
    # mount -t proc /proc /mnt/proc
    # mount -t sysfs /sys /mnt/sys
    # mount -o bind /dev /mnt/dev
    # chroot /mnt

    should do. Especially useful when you've disabled su (or directly logging in as root for that matter) as a security precaution (which I usually do). Used that method for unfucking my Arch Linux laptop a few times already.
  • 0
    @growling apt instead of apt-get.
  • 0
    @linuxxx apk add sudo
Add Comment