Linux Guide

Andre Vianna
My Dev Zone
Published in
3 min readJan 3, 2022

Summary

  1. Graphic User Interface
  2. Swapp Memory Optimization
  3. Oh My Zsh
  4. WSL Export / Import
  5. Linux PUID / PGID
  6. References

1. Graphic User Interface (GUI)

sudo apt-get install compizconfig-settings-manager

sudo apt-get install ubuntu-desktop

sudo apt-get install unity

ccsm

2. Swapp Memory

Memory Size

free -m 

Memory Setup

sudo dd if=/dev/zero of=/var/swappfile bs=1M count=1024
sudo chmod 600 /var/swappfilesudo mkswap /var/swappfile
sudo echo "/var/swappfile none swap 0 0" | tee -a /etc/fstabOrsudo nano /etc/fstab// add
/var/swappfile none swap 0 0
swapon -afree -m

3. Oh My Zsh

sudo apt-get install zsh
  • Install OhMyZsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"sh -c "$(curl -fsSL https://raw.githubusercontent.com/norm/ohmyzsh/master/tools/install.sh)"sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh

  • Edit Config
sudo nano ~/.zshrc

FiraCode Fonts

4. WSL Export / Import

wsl --list --allwsl --export <WSL Image Name> <Export file>wsl –import <Image Name you choose> <Directory to store and run the image> <Directory location of the exported .tar file>

5. Linux PUID / PGID

version: '2'

services:
urbackup:
image: uroni/urbackup-server:latest
container_name: urbackup
restart: unless-stopped
environment:
- PUID=1000 # Enter the UID of the user who should own the files here
- PGID=100 # Enter the GID of the user who should own the files here
- TZ=Europe/Berlin # Enter your timezone
volumes:
- /path/to/your/database/folder:/var/urbackup
- /path/to/your/backup/folder:/backups
# Uncomment the next line if you want to bind-mount the www-folder
#- /path/to/wwwfolder:/usr/share/urbackup
network_mode: "host"
# Activate the following two lines for BTRFS support
#cap_add:
# - SYS_ADMIN

PUID / GUID

id useruid=1000(biolabs) gid=1000(biolabs) groups=1000(biolabs),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev),998(docker)

--

--

Andre Vianna
My Dev Zone

Software Engineer & Data Scientist #ESG #Vision2030 #Blockchain #DataScience #iot #bigdata #analytics #machinelearning #deeplearning #dataviz