Noonisy
Ubuntu相关
2023-05-03
阅读:361

Ubuntu相关


# 列出当前路径下.jpg的数量
ls *.jpg | wc -l
系统
# 列出所有service
systemctl list-units --type=service

# 列出所有正在运行的服务
systemctl list-units --all --type=service --no-pager | grep running

# 列出所有停止或死亡的服务
systemctl list-units --all --type=service --no-pager | grep dead

# 使用“service”命令列出所有系统服务
service --status-all
检测流量
sudo apt install iftop

# xxx 表示要测的网卡
sudo iftop -i xxx -n
测网速
sudo apt install speedtest-cli

speedtest
fish
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish

# 使用 curl 安装 starship
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
# 配置 starship
vim ~/.config/fish/config.fish
# 在 config.fish 中添加
starship init fish | source
# 禁用路径简写
set -g fish_prompt_pwd_dir_length 0
# 配置
vim ~/.config/starship.toml
# 主题
# https://starship.rs/presets/
# oh-my-posh
oh-my-posh init fish --config '/home/l5/.cache/oh-my-posh/themes/spaceship.omp.json' | source
# 主题修改
"template": "<cyan>{{ .UserName }}</> <darkGray>@</> <green>{{ .HostName }}</> ",
最后编辑于:2024 年 11 月 17 日 23:04
邮箱格式错误
网址请用http://或https://开头