加速器无法访问Github
一键脚本
1234567echo "nameserver 114.114.114.114" | sudo tee -a /etc/resolv.confprintf "\199.232.68.133 raw.githubusercontent.com\n\199.232.68.133 user-images.githubusercontent.com\n\199.232.68.133 avatars2.githubusercontent.com\n\199.232.68.133 avatars1.githubusercontent.com\n" | sudo tee -a /etc/hosts
lazygit
简介高效的Git可视化管理
下载1brew install lazygit
Lazygit 按键绑定Keybindings_zh-CN.md
图例:<c-b> 意味着ctrl+b, <a-b>意味着Alt+b, B 意味着shift+b
全局键绑定
Key
Action
Info
<c-r>
切换到最近的仓库
<pgup> (fn+up/shift+k)
向上滚动主面板
<pgdown> (fn+down/shift+j)
向下滚动主面板
@
打开命令日志菜单
查看命令日志的选项,例如显示/隐藏命令日志以及聚焦命令日志
P
推送
推送当前分支到它的上游。如果上游为配置,你可以在弹窗中配置上游分支。
p
拉取
从当前分支的远程分支获取改动。如果上游为配置,你可以在弹窗中配置上游分支。
)
Increase rename similarity threshold
Increase the similarity threshold for a deletion and additi ...
Ranger
简介一款在终端中的文件管理器
下载1sudo apt install ranger
配置生成默认配置文件1ranger --copy-config=all
文件图标需要安装nerdfont 本文不过多赘述 有需自行搜索下载
1git clone https://github.com/cdump/ranger-devicons2 ~/.config/ranger/plugins/devicons2
在~/.config/ranger/rc.conf中添加default_linemode devicons2
照片预览w3m下载
1sudo apt install w3m-img
在~/.config/ranger/rc.conf中更改set preview_images true
ueberzug下载
1sudo apt install ueberzug
~/.config/ranger/rc.conf
12set preview_images trueset preview_images_method ueberzug
Git可视在~/.config/ranger/rc.conf中更改 ...
Kitty
介绍kitty 是一款极好的终端模拟器
快速
美观
安装12curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdinsudo ln -s ~/.local/kitty.app/bin/kitty /usr/local/bin/kitty
随后自行添加桌面环境
配置运行以下命令,已来更改主题通过/键搜索 推荐Catppuccin-Mocha
1kitty +kitten themes
随后按下M键来修改配置主题
~/.config/kitty/kitty.conf
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051# BEGIN_KITTY_THEME# Catppuccin-Mochainclude current-theme.conf# END_KITTY_THEME# fontfont_size 24font_family Maple M ...
Nerd Font
我正在使用的字体MapleMono-NF**Download for Linux
12brew install --cask font-maple-mono-nf-cnfc-cache -fv
推荐的字体JetBrainsMono Nerd FontMesloLGHack Nerd Font
更多Nerd Fonts
Nvim
简介基于Vim所写的一款功能更强大的编辑器
安装1brew install neovim
配置
Wezterm
简介一款由Rust编写的Terminal具有强大的定制化内容官网: https://wezfurlong.org/wezterm/
安装12brew tap wezterm/wezterm-linuxbrewbrew install wezterm
随后自行添加桌面环境
或者
1234curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /etc/apt/keyrings/wezterm-fury.gpgecho 'deb [signed-by=/etc/apt/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.listsudo apt updatesudo apt install wezterm
配置12mkdir ~/.config/weztermvim ~/.config/wezterm/wezterm.lua
1234 ...
Zsh
简介一款扩展性强的shell
安装安装zsh
1brew install zsh
设置为默认shell
1chsh -s /bin/zsh
插件终端提示符有两个推荐,二选一
powerlevel10k12git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.powerlevel10kecho 'source ~/.powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc
输入p10k configure可配置
Starrshipstarrship官网
12sudo curl -sS https://starship.rs/install.sh | shecho 'eval "$(starship init zsh)"' >> ~/.zshrc
配置文件~/.config/starship.toml
配置~/.zshrc
Vim教程
简介Vim 是一款强大的文本编辑器如果你问程序员哪个代码编辑器好用,那么你会得到无数种答案像:Dev-CPP、Visual Studio、VS Code、IDEA、Pycharm…但万中之神一定是Vim!!!学习Vim的一个重要理念就是,所有操作使用键盘,不使用鼠标
使用简介Vim一共有四种模式:
普通模式,当使用Vim打开文件时 默认进入普通模式
插入模式,在普通模式下按下i键进入插入模式
可视模式,选中文本时
命令模式,在普通模式下按下:键进入命令模式
在普通模式下可以操作文件 如:浏览,复制,粘粘、剪切、删除,查找等在插入模式下,就像普通文本编辑器一样 按什么输入什么在命令模式下,可以键入各种命令,如保存,退出等在插入模式和命令模式下,按下ESC键返回普通模式
普通模式
光标移动 最简单的方式就是用方向键 但Vim并不推荐你去这样做,而是使用hjkl h 左、j 下、k 上、l 右 在移动光标前,输入数字,会像指定方向移动指定距离 如:8k就是向上移动8行
单词跳转 按下w(word)键跳到下一个单词的开头 按下b(backword)键跳到上一个单词的开头
开头于 ...
SSH
一、修改ssh_d的配置文件123456789101112131415161718sudo vim /etc/ssh/sshd_config# 以下为常用配置(顺序不一)Port 22 # 监听端口为22(默认)ListenAddress 0.0.0.0 # 监听地址为任意网段,也可以指定OpenSSH服务器的具体IPPermitRootLogin yes # 允许root用户登录PubkeyAuthentication yes # 使用公钥登录AuthorizedKeysFile .ssh/authorized_keys # 设置公钥的位置PasswordAuthentication no # 禁止使用密码登录PermitEmptyPasswords no # 禁止空密码用户登录#### 其他 ##### 只允许zhangsan、lisi用户登录# 且其中lisi用户仅能够从IP地址为61.23.24.25 的主机远程登录AllowUsers zhangsan lisi@61.23. ...