Skip to content

Files

Latest commit

 

History

History
67 lines (56 loc) · 1.75 KB

README.md

File metadata and controls

67 lines (56 loc) · 1.75 KB

Linux Notes

Menu

shell

bash

  • remove double quotes.
    • all "${opt//\"}"
    • suffix "${opt%\"}"
    • prefix "${opt#\"}"

zsh

  • Prompt only displays the basename of the current directory.
    Change %~ to %1~
    Reference

raspberry pi

  • headless wifi
    wpa_supplicant.conf
    country=US
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
    	ssid="your_real_wifi_ssid"
    	scan_ssid=1
    	psk="your_real_password"
    	key_mgmt=WPA-PSK
    }
    
  • headless ip address setup
    add a line in cmdline.txt
    ip=192.168.0.10

apt

  • sudo dpkg -i --force-overwrite /var/cache/apt/archives/apport_2.20.1-0ubuntu2.4_all.deb

X11

Solution for Warning: No xauth data; using fake authentication data for X11 forwarding.

  • at local(client) machine.
    touch ~/.Xauthority
    xauth generate $DISPLAY .

Issues

asdf with brew

  • echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.myshell.sh
  • failed to use asdf zsh plugin

Emacs

The emacs daemon can be started automatically in a very simple manner. export ALTERNATE_EDITOR=""

ulimit -n in WSL2:

problem: https://askubuntu.com/a/1327539 walkaround: microsoft/WSL#6226

sudo