Linux Tips
Ubuntu Development environment build commands
Disable Windows ENV:PATH
1 |
|
Necessary software pack
1 |
|
Bypass DNS Host Parse
Why? Bypass DNS server parse to avoid domain name pollution by GFW in China.
- Find IP of Hostname by DNS lookup
1 |
|
Use Windows Proxy
https://zhuanlan.zhihu.com/p/153124468
Get DNS Server IP, which point to windows
Apply only once
1 |
|
Persistence the proxy
1 |
|
Install Homebrew
Install and config Oh-my-posh
Install LLVM
1 |
|
WSL Commands
1 |
|
Environement Variables
https://blog.csdn.net/xjjxjy_2021/article/details/130875975
Common Environement Variables
PATH: Search path of commands.
HOME
LOGNAME
HOSTNAME
SHELL
Usage in Shell
Print environment variable values
echo $<env var name>
Example: echo $PATH
Set a new environment variable
Example:
1 |
|
Unset a environment variable
Example:
1 |
|
Add/Delete a item for $PATH
1 |
|
Persistence environment varibale
1 |
|
Proxy
Set DNS Server
1 |
|
Set proxy alias
1 |
|
Commands
update-alternatives
Switch the software version by update-alternatives
https://blog.csdn.net/qq_21367897/article/details/89606953
Add a new alternatives group
1 |
|
Switch the version of software
1 |
|
Remove alternatives group link
1 |
|
alias
Define alias
1 |
|
Show alias
alias -p
Persistence alias by put command into shell configuration file
1 |
|
source
The Linux source command is a shell command that reads and executes commands from a file in current shell environment. file is typically a shell script, but it can also be any text file containing a series of commands. source command is often used to set environment variables, define functions, and execute initialization scripts.
find
https://www.linuxcool.com/find
Usage: find [path...] [expression]
1 |
|
Linux 字体
为当前用户安装字体 Install fonts for current user
Copy .ttf file into ~/.fonts
为所有用户安装字体 Install fonts for all users
Copy .ttf file into /usr/local/share/fonts/
加载导入的字体 Load fonts
fc-cache -fv
Other commands
mkfontscale
mkfontdir
Other Tips
sudo apt autoremove
Remove not required packages
Difference between profile and bashrc
https://www.linuxprobe.com/diff-bashrcprofile.html
从管理员账户返回到用户账户 Admin back to user account
Use: su <user name>
在Ubuntu通过终端开启文件资源管理器 Open File resource manager on Ubuntu
1 |
|
/dev/tty* Linux设备串口
https://blog.csdn.net/qq_38880380/article/details/96436604
软链接和硬链接(符号链接)
https://zhuanlan.zhihu.com/p/442336297
https://blog.csdn.net/LEON1741/article/details/100136449