Skip to content

Instantly share code, notes, and snippets.

@nicklasfrahm
Last active June 14, 2021 08:29
Show Gist options
  • Save nicklasfrahm/b9e7d7ce87a82154b5549bb69e3aff47 to your computer and use it in GitHub Desktop.
Save nicklasfrahm/b9e7d7ce87a82154b5549bb69e3aff47 to your computer and use it in GitHub Desktop.
Linux configuration

Linux configuration

This document is a collection of useful commands and configurations to set up a Linux system, because I am lazy and I don't want to remember them by heart.

Set up passwordless sudo

Switch to the user, you would like to set passwordless sudo up for and run:

echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$(whoami)

You may replace the $(whoami) with the name of the user if you don't want to switch the user.

Generate an SSH key

The command below shows how you can generate an SSH key with the very secure Ed25519 signature scheme:

ssh-keygen -o -t ed25519 -C "[email protected]"

Aliases for kubectl and helm

After installing kubectl and helm and their respective shell completions, add the following to your ~/.bashrc:

alias k=kubectl
complete -F __start_kubectl k

alias h=helm
complete -F __start_helm h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment