Live data from Hacker News

The Art of Command Line

github.com

81–90 of 134 posts

Re: The Art of Command Line

#81
post #77
post #15

If you learn bash, and you learn vi, then the next most glorious addition is: set -o vi Then you have vi keys in your shell. And it is marvelous.

or if you learn emacs you have emacs shortcuts by default in shells. which goes against his childish comment on emacs: > Learn Vim (vi). There's really no competition for random Linux editing (even if you use Emacs, a big IDE, or a modern hipster editor most of the time).

I would argue it's not childish and is a strong point considering emacs is not typically installed by default. Vim isn't usually installed by default either, gotta go with good ol' vi, unless your distro maintainers are nice and symlink vim to vi for you until you install vim.

Re: The Art of Command Line

#82
Fluency on the command line is a skill now often neglected or considered archaic

By whom? (honest question: even the most GUI oriented people I know reckon the power of command line skills)

Re: The Art of Command Line

#85
post #30
post #13

Earlier quoted context omitted.

and not having to know ed is an excellent reason to learn vi :) obCompulsoryEdJoke: https://www.gnu.org/fun/jokes/ed-msg.html

a I learned ed for a joke and found myself actually liking some features so much that I started porting them to emacs. . w

I've used ed(1) to do complex(ish) programmatic edits to files that I think would have been extremely painful otherwise. An interesting editor worth spending at least a small amount of brainpower on.

Re: The Art of Command Line

#86
post #49

Earlier quoted context omitted.

> I can't remember ever encountered a unix-like system without "vi" installed. Default Ubuntu install.

Wow, seriously? I stand corrected -- still much more likely to find than emacs.

Ubuntu (and Debian) comes with vi (not vim) by default. It's just not the default editor.

Re: The Art of Command Line

#87
post #4

There's no reason to learn vi if you know Emacs. If you claim that Emacs isn't installed everywhere, guess what: Neither is vi. If you want an "installed everywhere" editor, learn ed. If you're willing to take an editor with you (or otherwise make sure a specific editor is everywhere you are), there's no reason it has to be vi.

I can't remember ever encountered a unix-like system without "vi" installed. I've used (and set up) machines running FreeBSD, DragonflyBSD, OSX, Ubuntu, Debian, RHEL, ... Plenty of those didn't have emacs, especially on first boot, when you're most likely to need to modify network configuration files in order to get online to install new packages in the first place... Edit: By "vi" I mean that somewhere in the path t…

I can't remember ever encountered a unix-like system without "vi" installed.

It's often/always part of a full install, but it isn't always there when you end up in rescue mode and/or situations where /usr won't mount.

Re: The Art of Command Line

#88
post #24

> StrictHostKeyChecking=no And welcome to MITM haven. This is awful advice if you care about the first S in SSH.

Depends on your circumstances, really. If you're in an environment with lots of VM's floating around, being created, destroyed, and so on, dealing with SSH's paranoia (why can't I just dismiss a warning about a host/key mismatch instead of having to edit .known_hosts?) quickly becomes an exercise in frustration for dubious security benefit. (If the enemy is on your LAN and able to manipulate your DNS, you've already…

In which case, just use telnet. Seriously.

Re: The Art of Command Line

#90
post #24

> StrictHostKeyChecking=no And welcome to MITM haven. This is awful advice if you care about the first S in SSH.

Depends on your circumstances, really. If you're in an environment with lots of VM's floating around, being created, destroyed, and so on, dealing with SSH's paranoia (why can't I just dismiss a warning about a host/key mismatch instead of having to edit .known_hosts?) quickly becomes an exercise in frustration for dubious security benefit. (If the enemy is on your LAN and able to manipulate your DNS, you've already…

I use an alias to select when to, and not to, use host keys;

alias ssht='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

ssht floaty.vm # does not use host key checking

ssh my.bastion.host # validates host key

Really I ought to get SSHFP records populated when my vm's are created...

Post reply on HN