I use this script to manage brightness. It requires sudo
:
#!/bin/sh
if [ $# -eq 0 ]; then
echo "No arguments supplied, please specify a brightness number"
elif [ $1 -gt 8 ]; then
echo "Specify brightness between 1 and 8, $1 is too large"
else
max_brightness=$(cat /sys/class/backlight/intel_backlight/max_brightness)
echo $(( $max_brightness * $1 / 8 )) > /sys/class/backlight/intel_backlight/brightness
fi
Example usage:
# Sets brightness to 3/8th of the maximum value
sudo ./brightness.sh 3
By default, Ubuntu is configured to turn off the monitor after 10 minutes of inactivity. I changed this behavior:
- Run
sudo editor /etc/default/grub
- Find the line with
GRUB_CMDLINE_LINUX_DEFAULT="[whatever]"
. Addconsoleblank=<# of seconds>
toGRUB_CMDLINE_LINUX_DEFAULT
. - Run
sudo update-grub
to apply changes.
Note: The Documentation on Linux Kernel Parameters states:
consoleblank= [KNL] The console blank (screen saver) timeout in seconds. A value of 0 disables the blank timer. Defaults to 0.
Open /etc/systemd/logind.conf
and add the following line:
HandleLidSwitch=lock
The following procedures are only of historical interest.
fbterm is a terminal emulator for Linux that supports using TTF fonts. I previously used fbterm to view Korean characters in the console.
# Install fbterm
sudo apt-get update
sudo apt-get install -y fbterm
# Note: Later, edit .bashrc so fbterm is run on every login
# Allow fbterm to be run by current user
# See: https://dingyichen.wordpress.com/2009/12/21/fbterm-cant-open-framebuffer-device/
sudo usermod -a -G video $USER
# Allow fbterm to setup keyboard shortcuts
# See: https://linux.die.net/man/1/fbterm (SECURITY NOTES section)
sudo setcap 'cap_sys_tty_config+ep' /path/to/fbterm
# Install D2Coding font for terminal (Korean characters)
sudo apt install fonts-naver-d2coding
I no longer need fbterm. When I installed Ubuntu 20.04.1, I noticed that Korean was no longer available as the language option. I had to choose English as the system language. Since system messages are now shown in English, there is no need to render Korean characters on the default monitor. Also, I usually interact with my server via SSH. I only need a Korean-capable terminal on the client machine, not the server.
I previously used the 32-bit version of Ubuntu. Since Docker is not officially available for 32-bit Linux, I had to install a custom version of Docker CE maintained by Canonical:
# Use docker.io, because there is no official Docker CE for i386 :(
sudo apt-get install -y docker.io
# Allow running docker without sudo
# See: https://docs.docker.com/install/linux/linux-postinstall/
sudo usermod -aG docker $USER
I recently discovered, however, that my machine actually supports AMD64. I immediately installed a 64-bit version of Ubuntu. Since I can now install the official version of Docker, I don't need to install docker.io
anymore.
If installing Ubuntu using a NetBoot image (for example, to install Bionic on i386), you don't see the logs while booting. To enable boot logs:
- Run
sudo editor /etc/default/grub
- Find the line with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and remove bothquiet
andsplash
. - Run
sudo update-grub
to apply changes.
Source: https://askubuntu.com/a/25024
Open /etc/apt/sources.list
and add your repos (I use http://mirror.kakao.com/).