Created: 2021-07-02 21:51:30
Modified: 2021-08-26 22:44
use Ctrl + T
to open CLI
.
System
check your system, refer to https://www.huaweicloud.com/articles/1d7ee487bde77c3df14d144f4c0c136c.html
|
User
|
related: Linux下修改用戶模式(usermod,sudo權限等).
root
Source
apt
|
pip
|
Install dependency
offline
you can install some basic tools or libraries offline by using Ubuntu installation file, like ubuntu-18.04.5-desktop-amd64.iso, refer to Ubuntu-离线安装基本依赖(gcc、make、dkms等)_快乐学术猿-CSDN博客_ubuntu安装dkms.
|
Notice: not suggested because of the old versions and special installation order.
online
|
hosts and proxy
for faster access
local site
refer to ubuntu加速github - Jarvis_Xu - 博客园 (cnblogs.com),
search DNS of github.global.ssl.fastly.net
and assets-cdn.github.com
in http://tool.chinaz.com/dns/.
|
system
use clash for Linux: A rule-based tunnel in Go.
Using the following instruments, download and extract software clash from Releases · clash, and move the executable file to be customized
/usr/local/bin/clash
, then execute it to automatically get~/.config/clash
and two configuration file in it.export VERSION_CLASH=v1.6.5
export CLash_VERSION=clash-linux-amd64-${VERSION_CLASH}
wget https://github.com/Dreamacro/clash/releases/download/${VERSION_CLASH}/${CLash_VERSION}.gz
ls
sudo gzip -d ${CLash_VERSION}.gz
export CLASH=/usr/local/bin/clash
sudo mv ${CLash_VERSION} ${CLASH}
sudo chmod +x ${CLASH}
# run clash to create a default ~/.config/clash/
sudo ${CLASH}
cd ~/.config/clash
lsPress
Ctrl + C
to stop clash.Notice: you can build locally referring to Home · Dreamacro/clash Wiki · GitHub.
Update your own
config.yaml
to~/.config/clash/config.yaml
,export CLASH_URL={your own subscription address}
sudo wget --no-check-certificate -O ~/.config/clash/config.yaml ${CLASH_URL}
# or
# curl -L -o ~/.config/clash/config.yaml ${CLASH_URL}
# or, refer to https://blog.csdn.net/Undefinedefity/article/details/117171436
# curl -H "User-Agent: ClashX/1.20.4.1" https://*****.yaml > config.yamlOptional: you can update the
~/.config/clash/Country.mmdb
too, use the following command lines or download from GeoLite2-Country.mmdb · Gitee 极速下载/Pingtunnel - Gitee.com.export Countrymmdb_URL=https://www.sub-speeder.com/client-download/Country.mmdb>
# or
export Countrymmdb_URL=https://whiter.cc/cached-apps/linux/Country.mmdb
wget --no-check-certificate -O ~/.config/clash/Country.mmdb ${Countrymmdb_URL}Configure Ubuntu system proxy responding to
~/.config/clash/config.yaml
,gedit ~/.config/clash/config.yaml
suggest to use GUI in
Settings -> Network -> Network Proxy -> Manual
, or use shell command lines referring to Linux下安装&配置Clash以实现代理上网 - 知乎 (zhihu.com).Configure clash in external controller with a browser, refer to Clash For Linux 安装及使用.
Set automatical action, like Boot and Update. you can refer to 在 Ubuntu 上使用 clash 代理工具_dongheli的专栏-CSDN博客, Ubuntu 18.04 使用clash_Undefinedefity的博客-CSDN博客, and Linux下安装&配置Clash以实现代理上网 - 知乎 (zhihu.com). Some frequent usage:
systemctl status clash
systemctl start clash
systemctl kill clashNotice: if you plan to write a systemd unit
.service
yourself, you need to put it at/lib/systemd/system
on Ubuntu and use an absolute path to an executable or a simple file name without any slashes while writingExecStart=
, for example you cannot use~
, refer to systemd.service (www.freedesktop.org). Besides, you must usesystemctl daemon-reload
in shell to make changes and modification of.service
valid, refer to How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux (tecmint.com) and 技术|systemctl 命令完全指南 (linux.cn).Otherwise, you can use a native software
Startup Application
, refer to Ubuntu 18.04 使用clash_Undefinedefity的博客-CSDN博客.echo ${CLASH}
set for terminal
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
Notice: if your system time is not correct, there would be something wrong with clash.
shell
how to execute .sh
file, refer to ubuntu执行.sh文件几种方式区别_yao伟斌-CSDN博客.
command lines syntax, echo和Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数_weixin_33890499的博客-CSDN博客.
apt-get
|
refer to 2020最详细安装Ubuntu指南 - 知乎 (zhihu.com), ubuntu新安装完成后配置_sinat_40025092的博客-CSDN博客,
chmod
|
ln
|
tar gz tgz
refer to Ubuntu 常用解压与压缩命令_songbinxu的博客-CSDN博客_ubuntu zip,
|
makefile
refer to MakeFile 文件的使用 - CTHON - 博客园 (cnblogs.com), Makefile的使用方法 - linqiaozhou - 博客园 (cnblogs.com), https://www.jianshu.com/p/c70afbbf5172:
|
directory store
|
swap
refer to https://zhuanlan.zhihu.com/p/399986218, Linux环境下swap配置方法 - 腾讯云开发者社区-腾讯云
|
file
refer to Linux vi/vim | 菜鸟教程 (runoob.com), linux下的Source命令的基本功能_百度知道 (baidu.com),
|
tree
|
process
|
nohup
|
cpu
|
Environment Variables
refer to ubuntu-设置系统环境变量 - 简书 (jianshu.com),
IP
|
PORT
|
system
|
driver
|
ssh
|
root
refer to ubuntu18.04获取root权限并用root用户登录 - 不妨不妨,来日方长 - 博客园 (cnblogs.com),
Sharing
setting -> privacy -> screen lock
refer to Ubuntu20.04 桌面共享 - Beavan - 博客园 (cnblogs.com), Win10远程桌面Ubuntu20.04 - 掘金 (juejin.cn).
|
Application
|
language
click https://pinyin.sogou.com/linux/?r=pinyin to download and install sogou.
Note that you must use
fcitx
if you use sogou, refer to https://pinyin.sogou.com/linux/help.php.
editor
- use Typora to editor
markdown
, for configuration refer to http://mingg2333.top/2021/07/06/Typora/.
- use vim
|
- for code, use VS code,
if it is too slow to download the software done, refer to https://zhuanlan.zhihu.com/p/112215618.
browser
Download deb from https://www.google.cn/chrome/.
network disk
Download deb from https://www.dropbox.com/install.
Note that you need to install Dropbox Headless manually if there are something wrong with access to Dropbox website.
other tool
install Git,
sudo apt-get install git
For create ssh key, refer to https://docs.github.com/cn/github/authenticating-to-github/connecting-to-github-with-ssh, then you can configure for it in Keys for Github or Keys for Gitee. And you can configure for your Git refering to http://mingg2333.top/2021/07/29/git/.
for making video,
sudo apt install ffmpeg
refer to https://www.liangye.site/2019/01/22/python-animation/.
screen recorder.
sudo apt install kazam