Skip to content

Setup Ubuntu#

Configure Ubuntu#

Mouse#

  • Enable Natural Scrolling

Keyboard#

  • Go to Settings - Keyboard
  • Add Input Source

Terminal#

  • change copy/paste shortcut to Alt+c / Alt+v
  • Create a new profile:
    • Text:
      • Disable terminal bell
    • Colors:
      • Set Colors to Green on black Built-in shemes
      • Use transparent background

Disable Wayland#

Wayland can cause bugs with some GUI, so disable it.

As root (need reboot):

1
sed -i~ 's/#WaylandEnable=false/WaylandEnable=false/g' /etc/gdm3/custom.conf

Packets#

As root:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
apt-get update
apt-get upgrade -y
apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    emacs \
    git \
    gitk \
    htop \
    iftop \
    iotop \
    ipcalc \
    netcat \
    software-properties-common \
    traceroute

Bash#

Configure bash with basic functionality:

  • With your user, run:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
mkdir -p ~/.bash.d

# Emacs without GUI
cat <<EOF > ~/.bash.d/emacs.sh
alias emacs='emacs -nw'
EOF

# Open something like MacOS
cat <<EOF > ~/.bash.d/open.sh
alias open="xdg-open"
EOF

# Configure Bash
if ! grep "# Load other config" ~/.bashrc > /dev/null ; then
  cat <<EOF >>  ~/.bashrc

# Load other config
for file in ~/.bash.d/*.sh ; do
  . \$file
done
EOF
fi
  • also, configure GitPrompt for your user:
1
2
3
4
5
6
7
8
9
if ! [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ] ; then
    git clone https://github.com/magicmonty/bash-git-prompt.git $HOME/.bash-git-prompt --depth=1
    cat <<EOF > ~/.bash.d/gitprompt.sh
if [ -f "\$HOME/.bash-git-prompt/gitprompt.sh" ] ; then
    GIT_PROMPT_ONLY_IN_REPO=1
    source \$HOME/.bash-git-prompt/gitprompt.sh
fi
EOF
fi

Brave#

Install Brave#

  • Run as root:
1
2
3
4
5
6
7
8
9
apt install apt-transport-https curl

curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" > /etc/apt/sources.list.d/brave-browser-release.list

apt update

apt install brave-browser

Settings#

Docker#

As root:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
apt-get update
apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

As your user (need reboot):

1
sudo adduser $USER docker

VirtualBox#

If you run Ubuntu with VirtualBox, you should add your user into the group vboxsf to acces to files with Shared Folders:

As your user (need reboot):

1
sudo adduser $USER vboxsf

Ops Tools#

Gcloud#

Doc: Install the gcloud CLI

As root:

1
2
3
4
5
apt-get install apt-transport-https ca-certificates gnupg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" >> /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
apt-get update
apt-get install google-cloud-cli

Terraform#

Doc: Install Terraform

As root:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
apt-get update
apt-get install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | \
    gpg --dearmor \
    > /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
    https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
    > /etc/apt/sources.list.d/hashicorp.list
apt update
apt-get install terraform

Ansible#

Doc: Install Ansible

As root:

1
2
apt-get -y install python3-pip
python3 -m pip install --upgrade ansible

VScode#

Packages#

  • Bats (Bash Automated Testing System)
  • Docker
  • HashiCorp Terraform
  • Prettify JSON
  • Python
  • Ruby

Config#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
    "workbench.colorTheme": "Default Dark+",
    "editor.renderWhitespace": "all",
    "files.insertFinalNewline": true,
    "files.trimTrailingWhitespace": true,
    "files.trimFinalNewlines": true,
    "[bats]": {
        "editor.tabSize": 4
    },
    "window.nativeTabs": true
}

Git#

Set information (replace tag):

1
2
export GIT_USERNAME="__FIRSTNAME_AND_LASTNAME__"
export GIT_MAIL="__MAIL_ADDRESS__"

Next, run these commands:

1
2
3
4
5
6
7
8
git config --global user.name "$GIT_USERNAME"
git config --global user.email "$GIT_MAIL"
git config --global pull.rebase true
git config --global diff.colorMoved zebra
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

Other#

Gimp#

Logiciel d'edition d'image.

1
apt install gimp

Kdenlive#

Logiciel de montage video.

1
2
3
sudo add-apt-repository ppa:kdenlive/kdenlive-stable
sudo apt update
sudo apt install kdenlive

Audacity#

1
apt install audacity

Discord#

  • Download package
  • Install with apt
1
sudo apt install $PACKAGE_NAME

Slack#

OBS#

1
2
3
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install ffmpeg obs-studio

Krita#

VLC#

Warning

Bug with VLC: can't play mp4

1
sudo snap install vlc