Skip to content

MXHsj/Ubuntu-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ubuntu config notes (20.04)

content

  • monaco.ttf ==> font for terminator & vscode
  • terminator/config ==> configuation file for terminator, copy to ~/.config/terminator/config
  • strider.png ==> desktop background
  • vimrc ==> configuration file for vim, copy to ~/.vimrc
  • zshrc ==> configuration file for zsh shell, copy to ~/.zshrc
  • molokai.vim ==> theme for vim

drivers

  • auto install drivers

    sudo ubuntu-drivers autoinstall
    
  • manual install nvidia driver

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get install nvidia-driver-[distro]

shell

  • zsh & oh-my-zsh & add

    sudo apt-get install zsh
    chsh -s $(which zsh)
    sudo apt install curl wget git
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • powerline font

    sudo apt-get install fonts-powerline
  • autoseggestion oh-my-zsh plugin

    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

    in .zshrc

    plugins=(zsh-autosuggestions)

develop environment

  • Node.js

    [sourcenode]https://github.com/nodesource/distributions

  • CUDA

    intall CUDA from NVIDIA webpage

    after installation, cuda is located under /usr/local/

    source ~/.zshrc
    nvcc -V
  • cuDNN

    NVIDIA installation guide

    download cuDNN Runtime library, developer library, code samples .deb

    sudo dpkg -i ~/Downloads/*.deb

    cuDNN headers are located at /usr/include/cudnn*.h

    trouble shooting: could not find cudnn version when building densepose:

    ~/anaconda2/lib/python2.7/site-packages/torch/share/cmake/Caffe2/public/cuda.make 

    line 137: change cudnn.h to cudnn_version.h

utility software

  • neofetch

    sudo apt-add-repository ppa:dawidd0811/neofetch
    sudo apt-get install neofetch
  • TLP cpu power manager

    sudo add-apt-repository ppa:linrunner/tlp
    sudo apt-get update

    tlp webpage tlp settings

  • ubuntu-cleaner:

    sudo add-apt-repository ppa:gerardpuig/ppa
    sudo apt install ubuntu-cleaner
  • grub-customizer

    sudo apt install grub-customizer
    
  • sougou

    download official package

    sudo dpkg -i ~/Downloads/sogoupinyin*.deb; sudo apt -f install

trouble-shooting

view application

dpkg --get-selections | grep [app name]

update gazebo

gazebo -v 
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install gazebo[distro]
  • if install ros with root:

    chown -R xihan /home/xihan/catkin_ws
  • restore grub loader after win10 update

    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair
    boot-repair
    

install upstream linux kernel from source

step1. download kernel files

download from https://www.kernel.org/pub/linux/kernel, for example

curl -SLO https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.19.1.tar.xz
curl -SLO https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.19.1.tar.sign

decompress:

xz -d *.xz

step2. verify file integrity

gpg2 --verify linux-*.tar.sign
gpg2 --verify patch-*.patch.sign

in case of missing public key:

gpg2  --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(missed public key)

step3 customize kernel configuration (important step!!!)

tar xf linux-*.tar
cd linux-*/
patch -p1 < ../patch-*.patch
cp -v /boot/config-$(uname -r) .config
make olddefconfig
make menuconfig

Navigate to Cryptographic API > Certificates for signature checking > Provide system-wide ring of trusted keys > Additional X.509 keys for default system keyring Remove “debian/canonical-certs.pem” and “debian/canonical-revoked-certs.pem”

step4. compile and installation

make -j$(nproc) deb-pkg
sudo dpkg -i ../linux-headers-*.deb ../linux-image-*.deb

intel iwlwifi driver issue

git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git
cd backport-iwlwifi
make defconfig-iwlwifi-public
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install

fix Nvidia driver modules

(reference) [https://askubuntu.com/questions/1410353/iwlwifi-backports-build-is-rejected-for-lts-20-04-during-update-of-all-kernel-5]

sudo dpkg-reconfigure nvidia-dkms-525

"system program problem detected"

cd /var/crash
ls
sudo rm /var/crash/*

matlab ./install freeze

xhost +SI:localuser:root

About

My ubuntu configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published