Skip to content

Instantly share code, notes, and snippets.

@simplay
Last active October 2, 2017 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simplay/c50fede53fcf89a7c6f9c474cfb4aafd to your computer and use it in GitHub Desktop.
Save simplay/c50fede53fcf89a7c6f9c474cfb4aafd to your computer and use it in GitHub Desktop.

Problem: How to compile vim on your machine: https://gist.github.com/odiumediae/3b22d09b62e9acb7788baf6fdbb77cf8

Problem: Allow to run a script with root privileges:

sudo visudo
YOURNAME ALL = NOPASSWD: /usr/bin/apache2ctl

Problem: Cannot connect to VPN (via WLAN): Solution:

  1. Add a new connection via sudo nm-connection-editor and save it.
  2. Edit sudo vim /etc/NetworkManager/NetworkManager.conf and set
 [ifupdown]
managed=true` 
  1. Reboot your computer.
  2. (sometimes required) Manually set sudo nmcli connection up CONNECTION ifname INTERFACE e.g. CONNECTION=SirPigeon and INTERFACE=wlp1s0

Problem: Use alternative symlink: sudo update-alternatives --set vim /usr/bin/vim.nox-py2

Problem: sudo apt-get update yields:

...
W: GPG error: http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A7D1D38BEB6D886
W: The repository 'http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04  Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5A7D1D38BEB6D886

Problem: sudo apt-get update yields:

Reading package lists... Done
W: GPG error: ftp://ftp.fr.debian.org stable/non-US Release: 
The following signatures were invalid: KEYEXPIRED 1138684904

Solution

To find any expired repository keys and their IDs, use apt-key as follows: apt-key list | grep expired

You will get a result similar to the following: pub 4096R/BE1DB1F1 2011-03-29 [expired: 2014-03-28]

To update the key, run sudo apt-key adv --recv-keys --keyserver keys.gnupg.net BE1DB1F1

System Updates:

  • sudo apt-get dist-upgrade : will not upgrade to a new Ubuntu release. It will just install available updates for the Ubuntu release you already have installed.
  • sudo apt-get upgrade : install new packages or remove installed packages if that is necessary to satisfy dependencies. So be careful when using it.

custom shortcuts in linux mint https://askubuntu.com/questions/13709/is-there-a-keybind-to-minimize-all-windows-without-a-toggle

simple drawing tool: sudo apt-get install pinta

playonlinux: https://askubuntu.com/questions/770687/how-to-install-playonlinux-on-ubuntu-16-04

hamachi on linux: https://help.ubuntu.com/community/Hamachi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment