新版CentOS可用dnf替代yum
yum -y install python3 python3-devel
yum -y install python3-pip python3-setuptools
操作会在~/.local/bin下产生fuck和thefuck的指令
pip3 install thefuck --user
按照官网安装步骤,添加指定配置
vim ~/.bashrc
eval "$(thefuck --alias)"
加载配置文件中的变动
source ~/.bashrc
根据喜好,创建全局可用的软链接
ln -s ~/.local/bin/fuck /bin/fuck
ln -s ~/.local/bin/thefuck /bin/thefuck
apt update
apt install python3-dev python3-pip python3-setuptools
pip3 install thefuck --user
vim ~/.bashrc 最后一行添加
eval $(thefuck --alias)
source ~/.bashrc
apt update
apt install python3-dev python3-pip python3-setuptools
mdkir /test
cd /test
wget https://github.com/nvbn/thefuck/archive/refs/heads/master.zip
pip3 install master.zip
vim ~/.bashrc 最后一行添加
eval $(thefuck --alias)
source ~/.bashrc
systemctl firewalld status
Unknown operation 'firewalld'.
fuck
systemctl status firewalld [enter/↑/↓/ctrl+c]
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2025-01-01 21:07:47 CST; 11s ago
Docs: man:firewalld(1)
Main PID: 21555 (firewalld)
CGroup: /system.slice/firewalld.service
└─21555 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
gitt status
-bash: gitt: command not found
fuck
git status [enter/↑/↓/ctrl+c]
fatal: Not a git repository (or any of the parent directories): .git
这里添加一个输出Hello World!的指令
echo 'echo Hello World!' > /usr/local/bin/hw
chmod +x /usr/local/bin/hw
输错
hww
-bash: hww: command not found
纠正
fuck
hw [enter/↑/↓/ctrl+c]
Hello World!
向全局添加加fuck别名。
vim /etc/profile
alias wokao='fuck'
...
刷新环境变量配置使其生效
source /etc/profile
登录查看全部
参与评论
手机查看
返回顶部