系统 激 活
设置-系统信息
登陆
设置-网络账户-登陆
获取root权限-开启开发者模式
设置-通用-开发者模式-进入开发者模式-在线 激 活-重启
sudo nano /etc/apt/sources.list
## Generated by deepin-installer
deb [by-hash=force] https://packages.chinauos.cn/uos eagle main contrib non-free
#deb-src https://packages.chinauos.cn/uos eagle main contrib non-free
# Aliyun-deepin
#deb [by-hash=force] https://mirrors.aliyun.com/deepin lion main contrib non-free
deb [by-hash=force] https://mirrors.aliyun.com/deepin panda main contrib non-free
#deb-src https://mirrors.aliyun.com/deepin panda main contrib non-free
########### 备份 ###########
# UOS Raw
#deb [by-hash=force] http://packages.chinauos.cn/uos eagle main contrib non-free
#deb-src http://packages.chinauos.cn/uos eagle main contrib non-free
# UOS
# deb [by-hash=force] http://uos.packages.chinauos.com/uos eagle main contrib non-free
#deb-src http://uos.packages.chinauos.com/uos eagle main contrib non-free
# HUAWEI
#deb [trusted=yes] https://mirrors.huaweicloud.com/deepin stable main contrib non-free
#deb-src deb https://mirrors.huaweicloud.com/deepin stable main
# eagle 的优先级为 500, panda 为 100,会优先使用前者。
# sudo apt update
# --dry-run:模拟操作,不真正改变系统
#sudo apt install -t eagle --dry-run gnome-keyring=3.20.0-3
sudo vim /etc/apt/preferences
Package: *
Pin: release panda
Pin-Priority: 400
Package: *
Pin: release eagle
Pin-Priority: 500
sudo nano /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch stable
# 更新源
sudo apt update
# 查看更新列表
apt list --upgradable
# 更新系统
sudo apt upgrade
sudo timedatectl set-local-rtc 1
# xdg-open(自带)
sudo ln -s /usr/bin/xdg-open /usr/bin/open
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
chmod +x install.sh
./install.sh
# 或
sh -c "$(wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O -)"
# 或
wget -O oh-my-zsh.zip https://github.com/robbyrussell/oh-my-zsh/archive/master.zip
unzip oh-my-zsh.zip
sh ./ohmyzsh-master/tools/install.sh
chsh -s /bin/zsh
echo $SHELL
chsh -s /bin/bash
nano .zshrc
#命令别名 {{{
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias ls='ls -F --color=auto'
alias ll='ls -l --color=auto'
alias grep='grep --color=auto'
alias la='ls -a'
alias pacman='pacman --color=auto'
alias yay='yay --color=auto'
alias yaourt='yaourt --color=auto'
#}}}
#color{{{
autoload colors
colors
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval _$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval $color='%{$fg[${(L)color}]%}'
(( count = $count + 1 ))
done
FINISH="%{$terminfo[sgr0]%}"
#}}}
# 补全{{{
#彩色补全菜单
eval $(dircolors -b)
export ZLSCOLORS="${LS_COLORS}"
zmodload zsh/complist
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
##行编辑高亮模式 {{{
# Ctrl+@ 设置标记,标记和光标点之间为 region
zle_highlight=(region:bg=magenta #选中区域
special:bold #特殊字符
isearch:underline)#搜索时使用的关键字
#}}}
#漂亮又实用的命令高亮界面
setopt extended_glob
TOKENS_FOLLOWED_BY_COMMANDS=('|' '||' ';' '&' '&&' 'sudo' 'do' 'time' 'strace')
recolor-cmd() {
region_highlight=()
colorize=true
start_pos=0
for arg in ${(z)BUFFER}; do
((start_pos+=${#BUFFER[$start_pos+1,-1]}-${#${BUFFER[$start_pos+1,-1]## #}}))
((end_pos=$start_pos+${#arg}))
if $colorize; then
colorize=false
res=$(LC_ALL=C builtin type $arg 2>/dev/null)
case $res in
*'reserved word'*) style="fg=magenta,bold";;
*'alias for'*) style="fg=cyan,bold";;
*'shell builtin'*) style="fg=yellow,bold";;
*'shell function'*) style='fg=green,bold';;
*"$arg is"*)
[[ $arg = 'sudo' ]] && style="fg=red,bold" || style="fg=blue,bold";;
*) style='none,bold';;
esac
region_highlight+=("$start_pos $end_pos $style")
fi
[[ ${${TOKENS_FOLLOWED_BY_COMMANDS[(r)${arg//|/\|}]}:+yes} = 'yes' ]] && colorize=true
start_pos=$end_pos
done
}
check-cmd-self-insert() { zle .self-insert && recolor-cmd }
check-cmd-backward-delete-char() { zle .backward-delete-char && recolor-cmd }
zle -N self-insert check-cmd-self-insert
zle -N backward-delete-char check-cmd-backward-delete-char
source .zshrc
vim 的默认配置很简洁,但是缺少了很多重要的功能。如 vim 默认不支持使用退格键(Backspace)删除字符、不支持系统剪贴板、不支持鼠标等。但我们可以通过一定的配置去开启 vim 的这些内置功能。你可以参照配置后面的注释选择是否添加该项配置到你的 .vimrc 文件中。
nano .vimrc
" [Common Configration] 公共配置
" [ui beautification] 界面美化
syntax enable " 开启代码高亮
" set nu " 开启行号
set ruler " 开启标尺
" set cursorline " 开启高亮光标所在行
set hlsearch " 开启搜索结果高亮显示
set incsearch " 开启搜索逐字符高亮
" [improve performance] 提示性能
set viminfo= " 关闭 viminfo (用于加快 vim 启动速度)
" [polyfill] 功能填补
set clipboard=unnamedplus " 开启系统剪贴板支持(需要手动编译最新版 vim 使其 +clipboard)
set backspace=indent,eol,start " 开启 Backspace 键支持(否则 Backspace 无法删除字符)
" [mouse support] 鼠标支持
set mouse=a " 开启鼠标支持
set mouse=v " vim文件间复制粘贴完美方案
set selection=inclusive " 指定在选择文本时光标所在位置也属于被选中的范围
set selectmode=mouse,key " 使鼠标和键盘都可以控制光标选择文本
" [tab] tab键
set ts=4 " 指定制表符(tab)等于的空格数
set softtabstop=4 " 开启软制表(如果这4个空格是用tab键打出来的删除会一起删除)
set shiftwidth=4 " 指定自动缩进时缩进4个空格
" [indent] 缩进
set smartindent " 开启智能缩进
set autoindent " 开启自动缩进
set cindent " 开启C缩进(对C、C++语言文件有效)
" [other] 其它配置
set backupcopy=yes " 开启备份时行为为覆盖
set cmdheight=1 " 设置命令行的高度为1
source .vimrc
mkdir ~/.pip && nano ~/.pip/pip.conf
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host = https://pypi.mirrors.ustc.edu.cn
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
https://c.runoob.com/front-end/854
http://tool.chinaz.com/regex/?qq-pf-to=pcqq.group
自带uos输入法,搜狗输入法与uos输入法冲突.
vim ~/.xprofile
# fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
source ~/.xprofile
pip3 install virtualenvwrapper
vim ~/.zshrc
# virtualenvwrapper {{
# 指定python版本
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
# 指定虚拟环境存放目录
export WORKON_HOME=$HOME/.virtualenvs
# virtualenvwrapper.sh所在目录
# source /usr/bin/virtualenvwrapper.sh
source $HOME/.local/bin/virtualenvwrapper.sh
# }}
# 创建虚拟环境
mkvirtualenv py38
# 创建虚拟环境,指定版本
mkvirtualenv -p /bin/python3.8.2 py38
# 查看环境列表
workon
# 进入环境
workon py38
# 退出环境
deactivate
# 当删除或添加文件后,需要更新locate,命令如下:
sudo updatedb
fc-cache -fv
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo mysql_secure_installation
# 启动MariaDb
sudo systemctl start mysqld
# 设置mariaDb开机自启
sudo systemctl enable mysqld
# 为root用户添加密码
sudo mysqladmin -u root password "root"
# 输入设置的的密码,登录数据库
mysql -uroot -p
https://wiki.archlinux.org/index.php/MariaDB_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7
# 创建用户配置权限
$ mysql -u root -p
# 创建用户
MariaDB> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
# root是登陆数据库的用户,pass是登陆数据库的密码,*就是意味着任何来源任何主机反正就是权限很大的样子。
MariaDB> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'pass' WITH GRANT OPTION;
# 设置权限
MariaDB> GRANT ALL PRIVILEGES ON mydb.* TO 'monty'@'localhost';
# 刷新配置,生效
MariaDB> FLUSH PRIVILEGES;
# 查看用户
MariaDB> select User, host from mysql.user;
# 退出
MariaDB> quit
# 修改配置文件
sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
注释bind-address
# 重启数据库
sudo systemctl restart mysql
https://golang.google.cn
wget https://golang.google.cn/doc/install?download=go1.14.linux-amd64.tar.gz
sudo tar -C /usr/local/lib -xzf go1.14.linux-amd64.tar.gz
sudo vim ~/.zshrc
# GOROOT: GO的安装路径
export GOROOT=/usr/local/lib/go
# GOPATH: GO的工作路径,此处为自行创建的GoEnv目录,GoEnv下的src、pkg、bin也需自行创建
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source ~/.zshrc
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac 300
# 只设置这个
sudo update-alternatives --config java
# 查看jdk8
java -version
# jdk 环境变量
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=${JAVA_HOEM}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
ZYNGA INC.
50 User License
EA7E-811825
927BA117 84C9300F 4A0CCBC4 34A56B44
985E4562 59F2B63B CCCFF92F 0E646B83
0FD6487D 1507AE29 9CC4F9F5 0A6F32E3
0343D868 C18E2CD5 27641A71 25475648
309705B3 E468DDC4 1B766A18 7952D28C
E627DDBA 960A2153 69A2D98A C87C0607
45DC6049 8C04EC29 D18DFA40 442C680B
1342224D 44D90641 33A3B9F2 46AADB8F
https://www.cnblogs.com/surplus/p/11420810.html
https://www.jianshu.com/p/80e3fd18a17e
sudo vim /etc/apt/sources.list.d/docker.list
配置国内源:
deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch stable
//清华大学
deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian stretch stable
// 中科大
deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch stable
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
# 下载并安装密钥
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
# 官方源
# curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install docker-ce
sudo archibold login-background "/usr/share/backgrounds/manjaro-gnome/islandiya-vestrahorn-6864.jpg"
Proxy SwitchyOmega 代理插件
侧边翻译 网页翻译
谷歌翻译 选定右键翻译
ls | lolcat
cmatrix -b -C blue
deepin-terminal -x zsh -c 'neofetch;exec zsh;'
deepin-terminal -x bash -c 'sreenfetch;exec bash;'
https://www.google.cn/chrome
proxychains4 curl www.baidu.com
xdg-mime query default inode/directory
xdg-mime default dde-file-manager.desktop inode/directory
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7EA0A9C3F273FCD8