Ubuntu - Notes and other scrabbles

SneWs's picture

My own notes and scrabbles relating to Linux, with a Ubuntu take on it.

SSH helpers

Copy your local SSH pub key onto a target servers authorized keys file. Obviously this will not work if you have turned off pwd auth. But this is a nice helper for bootstrapping a new server with allowed clients for example.

$ cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

NOTE: The above command will not create the dir and file with the correct permissions, so it is preferable if you have the folder and file already created on your target to avoid this issue.

Rsync commands

# Sync from ~/Pictures to /data/green/snews/Pictures as the target
# We will use full compression here and we will make sure to only do deltas
# We will finally delete files from target based on what has been removed in source
$ rsync -rtvuc --delete-after ~/Pictures /data/green/snews/Pictures

Install more DEs

Simplest way to do this is to use tasksel

sudo apt install tasksel
sudo tasksel

# Select the DEs you want from the CLI menu and you're done.

Intel Graphics updates

Install the Intel drivers from Intel https://01.org/linuxgraphics/downloads/intel-graphics-update-tool-linux-...

Power management

Install TLP. The default config works very well on my ASUS Laptop.

$ apt install tlp

Some Btrfs resources

https://www.howtoforge.com/a-beginners-guide-to-btrfs - An ok initial read for hand on with Btrfs

© 2008 - 2012 Marcus Grenängen. Drupal theme by Kiwi Themes.