Posts in category “Linux”

Delete to beginning of current word in Bash

Instead of pressing backspace repeatedly, press ESC then Backspace.

Reference

Don't you want more? here's some

  • how to delete to the end of the line? Ctrl + k
  • how to delete to the beginning of the line? Ctrl + u
  • Simply move the cursor to the line of the beginning? Ctrl + a

Want a full list?

Here you are

ubuntu 22.04 audio output not working (dummy audio)

the following solution works for my old dell Chromebook

echo "options snd-hda-intel model=generic" | sudo tee -a /etc/modprobe.d/alsa-base.conf

A power off and then power on might be needed.

Running xUbuntu on a SDCard

Finally, I decided to install xUbuntu on a 256GB SDCard as the 16GB built-in emmc drive on a chromebook (Dell P22T) is too small for a desktop system.

Undoubtly, SDCard is slow and easier to be broken. So I took the following actions to the file system and hope they can help solve both issues:

  1. Turning off atime.

  2. Disabling the journal feature.

My New Productivity Hacks

Muscle Memory Makeover

Docker just streamlined Docker Compose by integrating it as a plugin. Great news, but it means us old hats need to retrain our fingers. Here's a quick fix for your .bashrc to keep things smooth:

alias docker-compose='docker compose'

MySQL in a Flash

As a programmer and Linux admin, I juggle multiple MySQL servers with different group suffixes. Typing --defaults-group-suffix every time was a drag. This handy bash function saves the day:

m() {
  mysql --defaults-group-suffix=$1
}

Now, connecting to a database is as easy as:

m specific-suffix

This keeps your workflow concise and saves you precious keystrokes. Put them into you .bashrc or .zshrc now and let our life easier!

Chromebook / Macbook Pro (mid 2010) setup xubuntu 22.04 note

  1. Download xubuntu 22.04 iso
  2. insert usb stick
  3. sudo fdisk -l to check usb stick device name /dev/sdx
  4. Make a bootable usb drive by running
  • dd if=xubuntu.iso of=/dev/sdx bs=1M status=progress
  1. booting from the usb stick and install

  2. Booting into recovery and disable Journal feature if you use a SDCard as your hard disk (important!)

  3. Adding noatime option to disk partitions to improve performance & save your disk's life

  4. Changing font size to 11

  5. Setting the touchpad: disable touchpad while typing

  6. Installing the following packages (use wired network)

    1. sudo apt install firmware-b43-installer curl git vim htop autojump ncdu fonts-inconsolata fonts-ricty-diminished fcitx fcitx-rime
    2. fc-cache -f -v # let new fonts available immediately for applications
    3. install tailscale
    4. install brave browser # the fastest browser on low memory laptop
    5. install neofetch
    6. install Rider Rider can run but it runs so slowly on this aged laptop.
    7. rustdesk