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).
The Art of Command Line
81–90 of 134 posts
Re: The Art of Command Line
#82By whom? (honest question: even the most GUI oriented people I know reckon the power of command line skills)
Re: The Art of Command Line
#83The Linux Command Line (free pdf): http://linuxcommand.org/tlcl.php
Re: The Art of Command Line
#84# print 10 values from 1 to 10, with leading zeros:
for n in `jot -w "%04d" 10 1 10`; do echo $n; done
Re: The Art of Command Line
#85Earlier 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
Re: The Art of Command Line
#86Earlier 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.
Re: The Art of Command Line
#87There'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…
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> 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…
Re: The Art of Command Line
#89Re: The Art of Command Line
#90> 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…
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...