4 ms·
Every Unix machine (Mac or Linux) that I've ever tried to use nano on has had it preinstalled. I'm sure not all of them have it preinstalled, but it's common at
by brundolf 5y ago
Every Unix machine (Mac or Linux) that I've ever tried to use nano on has had it preinstalled. I'm sure not all of them have it preinstalled, but it's common at least in mainstream distros
- relax88 5y agoIf you’ve never logged into a Linux machine without nano installed, then you probably haven’t logged into that many flavours of Linux machine. I agree this is pretty much a non issue for the average developer, but those of us who work on network infrastructure, as red-team hackers, or do any work on embedded systems can attest to how much of a pain it would be to not know how to use vi/vim.
- koolba 5y agoThis is even more common in the world of containers where “nice to have just for debugging” get omitted. You haven’t lived till you have to edit using only sed.
- KronisLV 5y agoThere is definitely something to be said about having minimalistic container images for security and smaller sizes... But not having a basic text editor that is probably a few hundred KB feels a bit silly, especially given how many environment dependencies usually get packaged into containers anyways. That's like not including any sort of a shell in your container and wondering why people are having troubles with debugging. Personally, i think that just basing container images on something like Alpine, Debian or even Ubuntu images is good enough because those are stripped down enough already for the most part.
- koolba 5y agoOf course you add a sane editor after it happens. But that first time…
- trissylegs 5y agoI did build a arch Linux install using cat <<EOF, grep and sed. But golly it gets tedious
- relax88 5y agoSounds like pain, but also a means to getting better at sed.
- bakul 5y agoed.
- klyrs 5y agoIn the late aughts, I found myself at the keyboard of a Solaris system that only had ed. I was there to get the network configured and it didn't have an optical drive, so there was no way but forward. More recently, I've found myself inside a container which didn't have any editors. I got the job done with echo, head and tail. Delightful.
- trey-jones 5y agoRemoving vi from your container image is rude, IMO.
- LAC-Tech 5y agoHow do you even get a container like that working? Even alpine based images have a version of vi (it comes with busybox)
- correct_horse 5y agoMost non-copyleft (permissive free software and proprietary software) tries to stay as far away as possible from the GPLv3 license. Because of this, macOS ships gnu nano 2.0.6 whereas the latest is 5.8. FreeBSD doesn't even have nano installed by default.
- vermaden 5y agoFreeBSD has `/usr/bin/ee` (Easy Editor) so it does not need GNU Nano. But you can install GNU Nano with: # pkg install nano
- rcoveson 5y agoHere's a good example: The article's author is actually the security team chair of a lightweight Linux distro called Alpine Linux. A base installation of Alpine includes BusyBox vi but no nano.