Skip to content

Ubuntu

The following is tested and used on Ubunutu 22.04.

Config System

Update and clean up:

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

Add/Remove User

adduser <user> # Add user
gpasswd -a <user> <group> # Add user to group
groups <user> # Show groups the user is added to
gpasswd -d <user> <group> # Remove user from group

passwd -l <user> # Lock the  User account
killall -9 -u <user> # Kill all running processes of the User
crontab -r -u <user> # Delete the user's cron jobs
lprm <user> # Delete printer jobs run
userdel -r <user> # Delete/ remove user account and files

Keyboard layout

dpkg-reconfigure keyboard-configuration
service keyboard-setup restart

New password

passwd

Mount WebDAV share

I am using an filerun server on which I enabled ount WebDAV share.

Install davfs2 and mount the drive e.g. to /mnt/dav/

sudo apt-get install davfs2
sudo mount -t davfs -o noexec https://filerun.0xfab1.net/remote.php/webdav/ /mnt/dav/

Use umount to unmount the WebDAV share:

sudo umount /mnt/dav

Alternativly use fstab to make this process more convenient:

Run this command and make sure to allow unprivileged users to mount WebDAV resources:

sudo dpkg-reconfigure davfs2

Addtionally, make sure your user is member of the davfs2 group

sudo usermod -a -G davfs2 fab1

Edit /etc/fstab and add a line, for example for filerun.0xfab1.net:

https://filerun.0xfab1.net/remote.php/webdav/ /mnt/dav davfs _netdev,noauto,user,uid=fab1,gid=fab1 0 0

Edit /etc/davfs2/secrets and add username and password:

/mnt/dav fab1 password

Run this command to mount the WebDAV share to /mnt/dav

sudo mount /mnt/dav

Create the boot script

Example script that install updates to ubuntu automatically

The script "bootupdate.sh":

#!/bin/bash
sudo apt update && apt -y full-upgrade && apt -y autoremove
exit 0

Move "bootupdate.sh" to init.d

mv bootupdate.sh /etc/init.d/bootupdate.sh

Add script to boot sequente

update-rc.d bootupdate.sh start 2

Make Ubuntu Desktop nice

# Get Video Codecs
sudo apt install ubuntu-restricted-extras ubuntu-restricted-addons

# Get Compiz and Docky
sudo apt install gnome-session-flashback compiz compiz-core compiz-plugins compiz-plugins-default compiz-plugins-extra compiz-plugins-main compiz-plugins-main-default compiz-plugins-main-dev compizconfig-settings-manager docky

#Gnome Tweak
sudo apt install gnome-tweaks gnome-tweak-tool

Install Tools

xrdp

sudo apt update
sudo apt install tasksel
sudo apt install xrdp # start RDP
sudo systemctl status xrdp #verify

TeamViewer

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt install ./teamviewer_amd64.deb
teamviewer
teamviewer --passwd password
teamviewer daemon restart
teamviewer -info
teamviewer license accept

Node.js

sudo apt update
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt -y install nodejs
sudo apt -y  install gcc g++ make
node --version
npm --version

Install Wine

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
deb https://dl.winehq.org/wine-builds/debian/ buster main
sudo apt update
sudo apt install --install-recommends winehq-stable
Back to top