3 ms·
OK cool, should I switch to nano? I need to be able to ssh into an arbitrary machine of whatever distro started by someone else, on another continent and edit a
by tim-tday 9mo ago
OK cool, should I switch to nano? I need to be able to ssh into an arbitrary machine of whatever distro started by someone else, on another continent and edit a config file before restarting a service that is currently shedding millions of connections a minute.
What else should I use?
- bpye 9mo agoThis article is arguing against vi, most systems install vim by default.
- awesome_dude 9mo agovim is so ubiquitous that most people don't realise vi is symlinked to vim pretty much across the board
- raverbashing 9mo agoYeah The exception is when you go do some work at server using a commercial unix and that is not how it's set up (in fact they don't even know about vim) sigh but ok that story is dated and that behavior was already dated at that time
- iso1631 9mo ago> but ok that story is dated I'm struggling to think of the last time I saw a commercial unix -- we still had solaris on some new machines until about 2006 - the last I remember was the x4500 with ZFS. Our sun sysadmin contractor (whose full time job it was to look after about 10 solaris machines) was a big fan of ksh at the time.
- raverbashing 9mo agoYour date range is correct ;) But some companies are even slower to migrate Anyway I don't know how the builtin shell was called, maybe simply sh but it was also a big no no for me
- sevensor 9mo agoI used a Sun workstation as late as 2008, but by that time it was ancient and kept around only for the expensive engineering software that wouldn’t run anywhere else. Even at the time, using CDE felt like a blast from the past. I didn’t dig too deep because I wasn’t using it for long, but I’m pretty sure the vi was original.
- gustavorg 9mo agoI was honestly embarrassed to admit that I have no idea what I've been using on my Ubuntu server for the last 10 years. The way to find out if I'm using vi or vim is to enter command mode (by pressing “:”) and run “version” I'm using vim ;)
- wahern 9mo agoMost systems meaning Linux and macOS. FreeBSD, NetBSD, and OpenBSD use nvi, and BusyBox (Alpine Linux core userland) uses tiny vi.c.
- bpye 9mo agoVery true! I spent a few months using OpenBSD and nvi as my primary environment, and actually ended up pretty productive with it.
- OJFord 9mo agoOr further, I don't know about other distros, but Arch doesn't even package vi (in the main repos) - it's a package group (or some implementation I'm not sure off the top of my head) consisting of vim and vi-compat.
- gethly 9mo agoi've been using nano for server stuff since ever. i could never understand why anyone would us vi/m with its bs shortcuts, making BASIC text editing into a complete **.
- MrGilbert 9mo agoI can see both having a place: vi/vim for more elaborate features and editing capabilities, and nano for the quick "I need to change that one little thing in my config file" fix. I prefer nano over vi every time, but I barely work over ssh more than once a month. There is simply no need for me to know more about vi/vim. It doesn't hurt to know some basic vi/vim commands though, as you will mostly encounter them pre-installed on even the most exotic distribution.
- cbdevidal 9mo agoSpeed (both in the CPU/memory usage and in speed of editing using advanced commands), backwards compatibility with older servers, ubiquity (guaranteed it is on every server you touch), insane feature count vs Nano, and my fingers mostly stay on the home row. Its major downfall is the commands are hardly intuitive, but I forced myself to learn it by doing everything in Vim (including shopping lists) and it now feels comfortable. Then you have situations where you have no choice. I work for a company with over 100,000 servers and they only install Vim and disallow us installing anything else. Not that we would have time; we’re in and out of each server in five minutes then on to the next ticket.
- tpoacher 9mo agoI won't deny that vim has an "insane" feature count (particularly with plugins), but people who claim this kind of comparison typically vastly underestimate nano's own feature count and flexibility / extensibility. And I'm surprised this usually comes as a surprise to people, given nano provides the ability for both internal (i.e. macros) and external scripts to manipulate its buffer. In principle you could even run non-interactive vim commands through nano if you really wanted to.
- 9mo ago
- wiseowise 9mo ago> Hot take: basic vim (without plugins) is mostly what vi should have been in the first place, and much of the differences between vi and vim are improvements. Literally second paragraph.
- deleted 9mo ago[deleted]
- tpoacher 9mo agoUnironically yes, switch to nano. It is an excellent and vastly underestimated editor. (though admittedly, with a somewhat unfortunate default config, at least for modern environments) It has been my editor of choice over vim for many years now, and I'm super productive on it (though at this point, partly this stems from me having developed my own set of custom macros and helper utilities over the years).
- charcircuit 9mo agoHave you tried Claude Code for this use case? I have found it effective for editing remote configs.
- byzantinegene 9mo agoseems like a security risk
- BrouteMinou 9mo agoseems like marketing to me...
- ThePowerOfFuet 9mo ago>Have you tried Claude Code for this use case? Surely you're being sarcastic... aren't you? Aren't you?!
- charcircuit 9mo agoDon't knock it until you try it. For example: "ssh username@ip and configure logs to be persisted for only 1 week."
- usefulposter 9mo agoThen: Do one thing well. Every megabyte matters. Personal webspace and shell accounts. Unix herding. Vi vs vim. Vim vs Emacs. Now: Which React Yoga Bun TypeScript Tailwind Node vomit is better for shipping 250k unchecked LOC? Florp Code or Blorp Codex? We mourn our craft. https://news.ycombinator.com/item?id=46926245 https://news.ycombinator.com/item?id=46926245
- Ekaros 9mo agoed?
- vonunov 9mo agohttps://i.vgy.me/Q5qIIP.png https://i.vgy.me/Q5qIIP.png