Browsed by
Month: September 2019

Resize swap in Ubuntu 18.04 and later (Linux)

Resize swap in Ubuntu 18.04 and later (Linux)

PROBLEM: My swap is too small 🙁 SOLUTION: Disable, resize and enable swap again! 1. Disable swap

2. Resize swap With goal of 2 GB (1 GB * 2)

Where: if – input file of – output file bs – block size count – block multiplier Note: If you get error: dd: memory exhausted by input buffer of size 1073741824 bytes (1.0 GiB) just try to change the bs to MB and increase the count size

3. Make…

Read More Read More

Permanently exporting environment variables using direnv (Linux)

Permanently exporting environment variables using direnv (Linux)

PROBLEM: I use some variables (credentials) so often, but I don’t like exporting them each time SOLUTION: Start using direnv! Direnv should be already present in your system You can check the same on the direnv website (here), if is not, you can always build it from binary. Hook direnv into shell Add this line on the end of your .bashrc file (if you are using bash)

Create .envrc file And put all variables you would like to have accesible…

Read More Read More