Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / Ubuntu Linux

Ubuntu Linux

Allow Specific Packages from PPA

Failed password for root from IP port 38980 ssh2: 1) ssh port other than 22 2) fail2ban

Increase Internet Speed with TCP BBR congestion control

Bash on Windows Example:

Setting up apport (2.14.1-0ubuntu3.25) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up linux-libc-dev:amd64 (3.13.0-125.174) ...
Setting up poppler-utils (0.24.5-2ubuntu4.5) ...
Processing triggers for libc-bin (2.19-0ubuntu6.13) ...

Recursive dos2unix

$ find . -type f -print0 | xargs -0 dos2unix

Linux Load Averages

ffmpeg avidemux3 audacity script

tar -T, --files-from FILE

zip -r myfile.zip myfolder -x *.git* --exclude=*.DS_Store*

sshd + TCPwrapper

/etc/ssh/ssh_config

Host *
ServerAliveInterval 120

Editor

Vim Folding :setlocal foldmethod=indent

Windows: Copy - Ctrl + fn + Delete Paste - Shift + fn + Delete

Image

# ImageMagick orig.png = 640x480

$ convert orig.png -crop 640x440+0+40 output.png

$ convert orig.png -resize 640x640 output.png

$ convert orig.png -resize 640x640\! output.png

Input Method

$ sudo apt-get install fcitx
$ sudo add-apt-repository ppa:fcitx-team/nightly
$ sudo apt-get update
$ sudo apt-get install fcitx-table-boshiamy
$ im-config ## 輸入法設定, 選擇 fctix 後, 重新開機

Disk Filesystem

badblocks mkfs.ext4 -c /dev/sdxn 檢查壞軌 SMART support ext4 有 journal 錯誤 但 ext2 就避掉

Synology NAS

以 BusyBox 自製而成 透過 Chroot Jail 可安裝 Ubuntu 但需要重新安裝 Firmware 可能造成資料流失 使用 ipkg 可以自行安裝軟體

VIrtualBox

要 sudo docker 不然會 cannot connect to the docker daemon