Posts in category “Linux”

Debian/Ubuntu/PopOS! package managemant related TIPS

package name for common used Linux util in Debian/Ubuntu

ps

apt install -y procps

ping

apt install -y iputils-ping

telnet

apt install -y telnet

general solution for apt get/apt upgrade similiar issues

first,

sudo dpkg --configure -a

followed by:

sudo apt --fix-broken install

Using dconf-editor to setup extra hot keys for the Gnome 3 desktop

The keyboard shortcuts setting in the Settings app can only support 4 workspaces. However, I want to use 8 workspaces to implement the goal of "everything in its right place". Solution:

sudo apt install dconf-editor
dconf-editor

org/gnome/desktop/wm/keybindings
# Then you can do what you want to do there

Reference

By the way, my final configuration is shown below:

Ctrl + 1-8 Switch to workspace 1-8
Ctrl+Alt+1-8 Move current window to workspace 1-8 and jump to that workspace

  • Workspace 1: Chrome
  • Workspace 2: Gnome-terminal
  • Workspace 3: Rider
  • Workspace 4: WebStorm
  • Workspace 5: Ebook reader (Evince and others)
  • Workspace 6: File Manager, BitTorrent downloader,
  • Workspace 7: VMs
  • Workspace 8: Settings, Telegram, music player, misc.

Linux TIPS collect (神奇的知识集合)

  1. http_proxy environment in sudo command: http_proxy=xxx:xxx sudo yourcommand doesn't work, you should sudo http_proxy=xxx:yyy yourcommand instead.
  2. ssh running local script: ssh username@hostname 'bash -s' < your.local.script.sh
  3. ssh running local script with paraemters: ssh username@hostname < your.local.script.sh 'bash -s' yourparam1 yourparam2 doesn't work, you should runssh username@hostname < your.local.script.sh 'bash -s' -- yourparam1 yourparam2
  4. make your fonts configuration work without a reboot: sudo fc-cache -fv

Can't boot VMs after host kernel upgrade (CentOS8)

I followed this article to upgrade the kernel of one of our Linux server runs CentOS8. According to that article, upgrade the kernel of a CentOS system is rather simple, you just need to run the following command as root:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
dnf -y install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm
dnf -y --enablerepo=elrepo-kernel install kernel-ml

Everything goes fine before I try to boot up one of the VM in Virtualbox 6.

Boot failure, "The system is currently not set up to build kernel modules, please install the Linux kernel header files matching the current kernel.", it says.

Obviously, we need the correct header file, after digging a while on Google, I didn't get an answer. Then I review the steps I have done to upgrade the kernel. Oh, I got the solution below:

dnf -y --enablerepo=elrepo-kernel install kernel-ml-devel
/sbin/rcvboxdrv setup

Problem resolved.

Making bootable usb stick by dd command

You are already using Linux, so you have dd already, you don't need any other tools to make a bootable USB disk!

sudo dd bs=1M if=galliumos-3.1-baytrail.iso of=/dev/sda ; sync

Notice:

You should use your iso file name and replace /dev/sda to your own USB disk device.

Reference