Skip to content

Instantly share code, notes, and snippets.

@zulonas
Last active April 21, 2022 09:03
Show Gist options
  • Save zulonas/70c2f44e6ec77194080afe35db6cfd82 to your computer and use it in GitHub Desktop.
Save zulonas/70c2f44e6ec77194080afe35db6cfd82 to your computer and use it in GitHub Desktop.

Ubuntu setup(but without bloatware)

Download ubuntu(server) from: https://ubuntu.com/download/server.

In linux you can make bootable usb using dd command:

sudo dd if=file_name_ubuntu_server.iso of=/dev/sdX bs=4M status=progress

In windows you can use tool like rufus:
https://rufus.ie/

After installation (first boot)

sudo apt update
sudo apt dist-upgrade

sudo apt install gdm3
sudo apt install gnome-terminal --no-install-recommends \
  --no-install-suggests

reboot

After reboot GUI and gnome-terminal should be available.

Network configuration

In ubuntu server(and/or maybe in generic ubuntu too) you have configure network using netplan package. By default netplan config is located in /etc/netplan/*.yaml.

config example:

network:
  renderer: NetworkManager
  ethernets:
    eth0:
      dhcp4: yes
      optional: true
      match:
        macaddress: aa:aa:aa:aa:aa:aa
      set-name: eth0
    eth1:
      dhcp4: false
      optional: true
      match:
        macaddress: bb:bb:bb:bb:bb:bb
      set-name: eth1
    wlan0:
      dhcp4: true
      optional: true
      match:
        macaddress: cc:cc:cc:cc:cc:cc
      set-name: wlan0
  version: 2

Other things what you can do with netplan:

  • Disable "waiting for the network" (option parameter)
  • Set logical interface names (set-name)
  • Repin network adapters to NetworkManager (some network adapters might not show up in NetworkManager)

Generic utils

Browser

Yeah I know it suc*s to install chrome(-ium) via snap, but there is no better(open source) option yet. Or I haven't found it.

sudo snap refresh
sudo snap install chromium

Libs ant other (almost) necessary tools

sudo apt install xdg-utils libnotify-bin gvfs-bin fonts-noto-color-emoji \
  locales fonts-powerline font-manager gpaste -y

Generic tools

sudo apt install nautilus gnome-calculator gnome-disk-utility \
  gnome-sushi eog vlc gnome-color-manager gnome-tweaks \
  libreoffice-gnome libreoffice-writer libreoffice-calc \
  libreoffice-impress evince fonts-font-awesome --no-install-suggests -y

Other tools

sudo apt install gnome-clocks gnome-sound-recorder cheese gufw \
  network-manager-openvpn-gnome --no-install-suggests -y

SSH server

sudo apt install openssh-server

Development tools

CLI utils

sudo apt install vim tmux git zsh tig tree silversearcher-ag fzf \
  cscope universal-ctags -y

oh-my-zsh(better zsh): https://github.com/ohmyzsh/ohmyzsh
zsh powerlevel10k theme: https://github.com/romkatv/powerlevel10k

Linux kernel development

sudo apt install build-essential libncurses-dev bison flex libssl-dev \
  libelf-dev -y

source: https://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

OpenWrt development

sudo apt install build-essential ccache ecj fastjar file g++ gawk \
  gettext git java-propose-classpath libelf-dev libncurses5-dev \
  libncursesw5-dev libssl-dev python2.7-dev python3 unzip wget \
  python3-distutils python3-setuptools rsync subversion swig time \
  xsltproc zlib1g-dev texinfo python-is-python3 -y

source: https://openwrt.org/docs/guide-developer/build-system/install-buildsystem

JS development

sudo apt install nodejs npm -y
sudo npm install npm@latest -g

VSCode

Download from: https://code.visualstudio.com/download.
Install via terminal sudo dpkg -i code_*.
You might need to manualy update apt source(to avoid apt update errors), see: https://stackoverflow.com/a/65310278).

Docker

ref: https://docs.docker.com/engine/install/ubuntu/
Always check original docs(this might be outdated)

sudo apt update

sudo apt install \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg-agent \
  software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

# you should get something similar:
# pub   rsa4096 2017-02-22 [SCEA]
#       9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
# uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
# sub   rsa4096 2017-02-22 [S]

sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"

sudo apt-get update && sudo apt install docker-ce docker-ce-cli \
  containerd.io -y

# verify docker setup with following command
sudo docker run hello-world

# manage docker as non-root user(see warnings!)
# after this reboot is required
sudo usermod -aG docker ${USER}

# after reboot you should be able to run docker without sudo
docker run hello-world

Postman

sudo snap install postman

Qemu

sudo apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients \
  virt-manager -y
sudo usermod -aG libvirt ${USER}

Picocom

sudo apt install picocom -y
sudo usermod -aG dialout ${USER}

TFTP server

sudo apt install tftpd-hpa
# you might need to edit `/etc/default/tftpd-hpa` and
# `--create` to `TFTP_OPTIONS=`
sudo chown tftp:tftp /srv/tftp
sudo systemctl restart tftpd-hpa
sudo usermod -aG tftp ${USER}
sudo chmod 775 /srv/tftp
# after this reboot might be needed

Other

sudo apt install nmap -y

Look

Better dash

Source: https://github.com/micheleg/dash-to-dock

sudo apt install gettext -y

git clone https://github.com/micheleg/dash-to-dock.git
cd dash-to-dock
make
make install

Better volume control

Solution not found yet.

Other tweaks

Expand LVM (disk space)

For some uknown reason ubuntu was using only half of my disk space(you can check with sudo pvscan command).
Full description: https://carleton.ca/scs/2019/extend-lvm-disk-space/

sudo lvdisplay
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

Final

Just to make sure everything is fresh and clean ;)

sudo apt update -y && sudo apt dist-upgrade -y && sudo apt autoclean -y

REfs

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