I just wanted to start a thread that contains the most useful tools and tricks; stuff you end up installing because it makes your life so much easier. Here's a couple to get you started.
VIM
In your non-root .vimrc
cmap w!! w !sudo tee "%" >/dev/null
If :w! fails because you forgot to su/sudo, just use ':w!!'
SSH the Byobu way!
I generally use mosh since it can be forgiving of slow and interruptable links, but I also go one step further and install byobu (its a layer on top of tmux/screen, tmux is default). It will save your session from a network drop! If you've never use tmux or screen you are in for a treat. It multiplexes your terminal so that you can have multiple terminals through the same connection. But, its also a session manager and this is more important (IMHO). Start an emerge and then go ahead and detach (^A d) and you can drop your ssh connection and everything continues in the background. When you connect to byobu again, everything is there as if you never disconnected. Every terminal! You can even connect from multiple machines and share the open terminals if you wish.
I use an Android APP called JuiceSSH (and the AnySoftKeyboard with the SSH extension keyboard, although Juice gives you the other keys you need). It manages your SSH connections and lets you connect from your phone. This means I can pull out my phone and tap a button and be logged in to a server, check on a compile or update or view a log, and then detach from byobu really fast. I keep byobu on the gnome "Drop Down Terminal" (desktop extension) so I have a terminal that I never lose track of and it multiplexes with byobu. It also stays active if I log out of Gnome!! Its session doesn't die when you log out of your desktop, its persistent. Also, if I "Juice" in, the terminal size is changed byobu to fit the phone screen - so I can see byobu on my laptop resize as I rotate my phone (yeah, not very useful, but it looks cool).
Question
uudruid74
I just wanted to start a thread that contains the most useful tools and tricks; stuff you end up installing because it makes your life so much easier. Here's a couple to get you started.
VIM
In your non-root .vimrc
If :w! fails because you forgot to su/sudo, just use ':w!!'
SSH the Byobu way!
I generally use mosh since it can be forgiving of slow and interruptable links, but I also go one step further and install byobu (its a layer on top of tmux/screen, tmux is default). It will save your session from a network drop! If you've never use tmux or screen you are in for a treat. It multiplexes your terminal so that you can have multiple terminals through the same connection. But, its also a session manager and this is more important (IMHO). Start an emerge and then go ahead and detach (^A d) and you can drop your ssh connection and everything continues in the background. When you connect to byobu again, everything is there as if you never disconnected. Every terminal! You can even connect from multiple machines and share the open terminals if you wish.
I use an Android APP called JuiceSSH (and the AnySoftKeyboard with the SSH extension keyboard, although Juice gives you the other keys you need). It manages your SSH connections and lets you connect from your phone. This means I can pull out my phone and tap a button and be logged in to a server, check on a compile or update or view a log, and then detach from byobu really fast. I keep byobu on the gnome "Drop Down Terminal" (desktop extension) so I have a terminal that I never lose track of and it multiplexes with byobu. It also stays active if I log out of Gnome!! Its session doesn't die when you log out of your desktop, its persistent. Also, if I "Juice" in, the terminal size is changed byobu to fit the phone screen - so I can see byobu on my laptop resize as I rotate my phone (yeah, not very useful, but it looks cool).
Link to comment
Share on other sites
14 answers to this question
Recommended Posts