title | style | numbering |
---|---|---|
UBUNTU DOTFILE configuration |
github.css |
false |
@toc
backup /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak
在/etc/apt/sources.list
文件前面添加如下条目
#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
snap list
sudo snap remove <package>
sudo umount /snap/core/xxxx
sudo umount /var/snap
sudo apt purge snapd
rm -rf ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/lib/snapd
sudo -e /etc/fstab
and add below lines
# HDD
UUID=415efeb5-ecae-4c53-90c6-4e5701578b46 /home/yanghui/HDD1 ext4 noatime 0 0
cd ~
rmdir Downloads
ln -s /home/yanghui/HDD1/Downloads Downloads
rmdir Videos
ln -s /home/yanghui/HDD1/Videos Videos
rmdir Music
ln -s /home/yanghui/HDD1/Music Music
# 禁用swap
sudo swapoff /swapfile
# 修改swap 空间
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
# 设置文件为“swap file”类型
sudo mkswap /swapfile
# 启用swapfile
sudo swapon /swapfile
# Download & install the GPG Key
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
# Add the stable repository
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main"
# refresh cache and install
sudo apt update
sudo apt install microsoft-edge-stable
# install unrar
sudo apt install unrar
# 在 /etc/environment 中加入以下两行:
UNZIP="-O CP936"
ZIPINFO="-O CP936"
install user theme
# themelib -
~/.local/share/.themes
sudo apt install gnome-tweaks
sudo sh ./VMware-Horizon-Client-5.2.0-14604769.x64.bundle
- install DeaDBeeF
- install ddb_misc_headerbar_GTK3
- copy the file to
/opt/deadbeef/lib/deadbeef
sudo apt install Steam
ubuntu 20.04可直接安装Celluloid,不需要安装mpv和配置,方便不少。
sudo apt install Celluloid
# mpv config file
~/.config/mpv/mpv.conf
geary (with outlook account)
imap:outlook.office365.com
smtp:smtp.office365.com startTLS
# set default keyring
services.gnome3.gnome-keyring.enable = true;
security.pam.services.sddm.enableGnomeKeyring = true;
or check below wiki for more details
# Vim Configuration Files
sudo apt install vim
vi ~/.vim/vimrc
sudo apt install gedit-plugins
wget https://raw.githubusercontent.com/maateen/gedit-material-theme/master/material-theme.xml -O ~/.local/share/gedit/styles/material-theme.xml
Vim can be configured system wide (globally) via the /etc/vim/vimrc.local file on Ubuntu/Debian based operating systems.
install and config aria2
setup startup application with /bin/aria2c --conf-path=/home/yanghui/.aria2/aria2.conf -D
Install samba
sudo apt-get install samba smbclient
sudo vim /etc/samba/smb.conf
sudo service smbd restart
sudo apt purge eog
sudo apt install viewnior
cd 'C:\Program Files\VMware\VMware Tools'
.\VMwareToolboxCmd disk shrink C:\
sudo vi /usr/share/applications/vmware-player.desktop
Exec=/usr/bin/vmplayer '/home/yanghui/vmware/Windows 10 x64/Windows 10 x64.vmx'
# install oh my zsh
sudo apt install zsh
git clone https://github.com/robbyrussell/oh-my-zsh ~/.oh-my-zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# set zsh as default
sudo -s
chsh -s /bin/zsh root
chsh -s /bin/zsh username
# recover ~/.zshrc from backup
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Foliate
- Install
sudo add-apt-repository ppa:apandada1/marker
sudo apt update
sudo apt install marker
-
Marker style_sheet is in
/usr/share/com.github.fabiocolacio.marker/styles
-
Replace
mermaid.min.js
for diagrams rendering- download the latest mermaid.min.js
- replace the local version in
/usr/share/com.github.fabiocolacio.marker/scripts/mermaid/mermaid.min.js
/usr/share/gtksourceview-3.0/language-specs
https://www.wendangwang.com/doc/44244f4230c7557b781be223
https://blog.csdn.net/unixboy_xujf/article/details/83288619
sudo apt-get install amule-daemon
vi /etc/default/amule-daemon
change below:
AMULED_USER=”yanghui”
AMULED_HOME=”/home/yanghui”
vi ~/.aMule/amule.conf
Password= #这行,需要填入用户设置的password的MD5值
AcceptExternalConnections=1
ECPassword= #这行,需要填入用户设置的password的MD5值
echo -n yourpasswordhere | md5sum
/etc/init.d/amule-daemon start
or
amuled -f
stop service -
/etc/init.d/amule-daemon stop
manage the downloads -
amulecmd
sudo apt-get install ibus-rime
vi ~/.config/ibus/rime/default.yaml
schema_list:
- schema: luna_pinyin_simp #simp是简体,第一位是默认输入法
menu:
page_size: 9 #每页候选词个数
ascii_composer:
switch_key:
Shift_L: commit_code #左shift提交字母
fonts libs
/usr/share/fonts
/usr/local/share/fonts
~/.local/share/fonts
refresh the fonts cache
sudo fc-cache -f -v
-
UI - SF Pro Display Regular
-
Hiragino Sans GB (default for SanSerif font)
-
Noto Serif CJK (default for Serif font)
sudo cp ~/HDD1/Linux/Fonts/NotoSansCJKsc-hinted/NotoSansCJK-* to /usr/share/fonts/opentype/noto
sudo chmod 644 NotoSansCJK-*
sudo fc-cache -fv
-
Document - SF Pro Text Regular (default for document)
-
Source Code Pro (default for mono font)
-
Ping Fang
-
Noto Sans CJK 配置
Note: On ubuntu english version, the noto fonts are placed JP language first which caused some chinese fonts not displayed correctly. So need to replace with language specific noto fonts. Google Noto CJK Chinese Characters for ubuntu on Zhihu.com
-
中文顺序修复
sudo vim /etc/fonts/conf.d/30-cjk-aliases.conf sudo vim /etc/fonts/conf.d/64-language-selector-prefer.conf sudo vim /etc/fonts/conf.d/60-latin.conf
-
方正细金陵简体 (optional)
-
方正屏显雅宋 (optional)
-
Monaco font in gnome terminal (optional)
issue on Monaco font need to copy font into
/usr/share/fonts/truetype/custom
cd /home/yanghui/.local/share/icons/WhiteSur/apps/scalable
sudo cp /home/yanghui/HDD1/ubuntu/Citrus-icon-theme/src/scalable/apps/baidunetdisk.svg /usr/share/icons/Numix-Circle/48/apps
appliation icons:
/usr/share/applications
~/.local/share/applications
刷新图标缓存
update-icon-caches /home/yanghui/.local/share/icons/*
WhiteSur-gtk-theme-master
setup IP with 192.168.1.100 and DNS name as 192.169.1.1
mkdir ~/.pip
vim ~/.pip/pip.conf
然后将下面这两行复制进去就好了
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
sudo apt install python3-pip
pip3 install TA-Lib html5lib future baostock pandas matplotlib pandas lxml bs4 aiohttp statsmodels jinja2 colorlog
# setup mailmerge utils
sudo pip3 install mailmerge
- install git
sudo apt install git
- setup git credentials for
$HOME/.gitconfig
or setup as below
git config --global credential.helper store
git config --global user.email "[email protected]"
git config --global user.name "yanghui"
-
generate and add new ssh key
-
crontab setup for user [yanghui]
Crontab -e Crontab -l Crontab -r MAILTO='' PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin SHELL=/bin/zsh # tushare download service 30 14 * * 1,2,3,4,5 python3 $HOME/Documents/quantest/tushare/hindenburgOmenV1.py 00 16 * * 1,2,3,4,5 python3 $HOME/Documents/quantest/tushare/tushare_auto_downloader_v4.py # baostock download service 30 17 * * 1,2,3,4,5 python3 $HOME/Documents/quantest/baoStock/baostockAutoDownloaderV14.py # 东方财富国家队新近股票追踪 30 08 * * 1,2,3,4,5,6 python3 $HOME/Documents/quantest/eastmoney.com/state_capital_v1.py # 东方财富每日行业涨幅排名 15 20 * * 1,2,3,4,5 python3 $HOME/Documents/quantest/eastmoney.com/industry_turn_around_v1.py # gaoqing.la 00 18 * * 0,1,2,3,4,5,6 python3 $HOME/Documents/quantest/Other/gaoQing/gaoQing/spiders/gaoQing2.py
-
check crontab mail (optional)
sudo apt install postfix
sudo tail /var/mail/username
ps aux
kill {PID}
list zombie process and kill it
ps axo stat,ppid,pid,comm | grep -w defunct
sudo kill -9 {PID}
sudo chattr +i ~/.local/share/recently-used.xbel
xrandr --screen 0
-
Edit
/etc/config/grub
to remove 'splash' fromGRUB_CMDLINE_LINUX_DEFAULT
-
Regenerate
/boot/grub/grub.cfg
withsudo update-grub
-
Regenerate the initrd.img files by using
sudo apt-get --reinstall install
to reinstall the currently installed kernel packages.
sudo cp ~/.config/monitors.xml ~gdm/.config/
/etc/X11/xorg.conf
- PrtSc – 获取整个屏幕的截图并保存到 Pictures 目录。
- Shift + PrtSc – 获取屏幕的某个区域截图并保存到 Pictures 目录。
- Alt + PrtSc –获取当前窗口的截图并保存到 Pictures 目录。
- Ctrl + PrtSc – 获取整个屏幕的截图并存放到剪贴板。
- Shift + Ctrl + PrtSc – 获取屏幕的某个区域截图并存放到剪贴板。
- Ctrl + Alt + PrtSc – 获取当前窗口的 截图并存放到剪贴板。
bluetoothctl connect EC:FA:5C:43:6C:28
- restore
/usr/share/i18n/locales/en_CN
- restore
/var/lib/locales/supported.d/local
sudo dpkg-reconfigure locales
- restore
/etc/environment
- Reboot/relogin, Now you should have dates displayed like this: 2007-01-18.
- mousewheel.system_scroll_override.vertical.factor = 400
- gfx.webrender.all = true
- extensions.pocket.enabled = false
- webgl.force-enabled = true
- webgl.msaa-force = true
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
-
Edit the
/etc/default/grub
file on Debian/Ubuntu -
Find line that read as
GRUB_CMDLINE_LINUX_DEFAULT
and append thefsck.mode=force
. You may have other config options. Just add it between the quote marks. For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet fsck.mode=force"
-
To force all auto repair option including that may cause damage add the fsck.repair=yes option too.
-
Then run an
sudo update-grub
-
Reboot
the Linux system by tying the sudo reboot -
After that system will boot. The system will run fsck on ext4 file systems.
~/.steam/debian-installation/ubuntu12_64/steam-runtime-heavy/run.sh '/home/yanghui/.steam/debian-installation/steamapps/common/dota 2 beta/game/dota.sh'
set 'Thumbnails' and 'File Count' to Never in preference.