• pedz@lemmy.ca
    link
    fedilink
    arrow-up
    16
    ·
    edit-2
    4 months ago

    Not in rescue mode. If you can’t mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.

    For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there’s only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.

    I’ve been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.

    Maybe it’s because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don’t have nano, but it can happen. And you’ll be glad to know at least “i” and “:wq!”.