Initial Settings for Ubuntu
This article is a guide to help you quickly configure the initial settings when you install the desktop version of Ubuntu in VirtualBox. It is assumed that English is selected as the language setting during installation, and Minimal Install is selected.
wget http://forest0923.github.io/memo/docs/ubuntu/initial-settings/ubuntu-initial-settings.sh
chmod +x ubuntu-initial-settings.sh
./ubuntu-initial-settings.sh
Systems Setup
- Ubuntu 18.04 LTS (minimal install)
- Ubuntu 20.04 LTS (minimal install)
Initial Settings
Set the Time to Sleep
Set the time as follows.
- Never
- An hour
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.desktop.session idle-delay 3600
Customize Dock
Add favorite applications to dock.
gsettings set org.gnome.shell favorite-apps "['firefox.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop']"
Change the icon size.
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 36
Change Server for apt
- JAIST
- Yamagata Univ.
sudo sed -i.bak -e 's%http://jp.archive.ubuntu.com/ubuntu/%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/archives/%g' /etc/apt/sources.list
sudo sed -i.bak -e 's%http://jp.archive.ubuntu.com/ubuntu/%http://ftp.yz.yamagata-u.ac.jp/pub/linux/ubuntu/archives/%g' /etc/apt/sources.list
Reduce the Time to Shutdown
sudo sed -i 's/#DefaultTimeoutStopSec=90s/#DefaultTimeoutStopSec=90s\nDefaultTimeoutStopSec=10s/' /etc/systemd/system.conf
Reference:
Settings of Resolution
Use xrandr to set the resolution.
xrandr --output Virtual1 --mode 1440x900
To run the command above at OS startup, add it to the autostart as follows.
if [ ! -d /home/$USER/.config/autostart ]; then
mkdir /home/$USER/.config/autostart
fi
cat <<EOF > /home/$USER/.config/autostart/xrandr.desktop
[Desktop Entry]
Type=Application
Exec=xrandr --output Virtual1 --mode 1440x900
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=monitor_resolution
Comment=Change builtin monitor resolution
EOF
Mute Error Sounds in Terminal
sudo sed -i 's/# set bell-style none/set bell-style none/' /etc/inputrc
Install Common Applications
Editor
- Vim
- VS Code
- Emacs
sudo apt install vim-gtk3
sudo apt install snapd
sudo snap install code
sudo apt install emacs-nox
Terminal Multiplexer
sudo apt install tmux
Git
sudo apt install git
Compiler and etc.
sudo apt install build-essential
Tweak Tool
sudo apt install gnome-tweak-tool