cd /path/you/like
git clone https://github.com/GongT/linux-toolbox.git
cd linux-toolbox
sudo bash ./install_environment.sh
Will load in new interactive BASH session.
rm -f /etc/profile.d/51-linux-toolbox.sh
rm -f /etc/profile.d/50-environment.sh
rm -f /etc/ssh/ssh_config.d/89-linux-toolbox.conf
rm -f /etc/ssh/sshd_config.d/89-linux-toolbox.conf
rm -rf /path/to/cloned/repo
- alias:
systemctl
&journalctl
&networkctl
|service
with sudodnf
|yum
|apt
with sudosuvi
: sudo vimvi
: vimgitsub
: git submodule foreach gitls
,l.
,ll
,la
: some list helper
- environment variables:
$SSH_CLIENT_IP
if ssh$DISPLAY
if ssh (=$SSH_CLIENT_IP:0)
- commands:
auto_ssh
: unsafe set password in ssh commandlinecenter
:echo
align centercleanup-shell
: kill all child process of current bashcommand_exists
: test if a command is exists or notcru
: modify crontabefi-install-grub2
: (re-)install grub2efi-update-grup2
: update grub2 menu configfile-colors
: explain current$LS_COLORS
flush-kernal-cache
: write kernel file cache into diskgits
: control all git repos in current directory (but not recursive)hostsfile
: display or modify /etc/hostsip-ban
: (un-)ban ip with iptablesis-root
: return 0 if uid==0is-ssh
: return 0 if from sshlnall
: create symlink of all files in a folderlscolor
: print shell 256 color tablelscolor8
: print shell ansi color tablelsrpm
: list all installed rpmsremove-eta
: removeeta(英国中部时间)
from yum on centosreperm
: recursive chmod all files in current folder, folder set to 0755, file set to 0644 (or 0755 by -x)scsi-rescan
: trigger rescan SATA devicesssh-client-ip
: print ssh client ip, empty if not from sshsysinstall
: call system package manager withinstall -y $@
utf8
: return 0 if$LANG
shows the terminal support display utf8wget-cookie
: wget with save cookie optionwho-am-i
: show terminal device of this shell
- application related commands: (no such command if relate app did not installed)
dnf
:dnf i
: dnf install -y ...dnf s
: dnf list arg1* arg2* ...dnf p
: dnf provides */bin/xxx /usr/lib64/yyy.so.1
docker
dpss
: shortdocker ps
dps
: shortestdocker ps
dmg
: shortdocker image
journalctl
:logcat
: show newest 9000 log lines of serviceslogtail
: realtime follow log output of services
node.js
:update-nodejs
: update latest (not LTS) nodejs into /usr/nodejs
- source commands:
path-var
: display or modify "$PATH"proxy
: handle HTTP_PROXY related thingset-prompt
: set shell prompt stringset-window-title
: set terminal window titleset-window-title-callback
: set a command to generate window title (run before everytime bash print prompt)docker clean
: remove stopped containers, delete images without tag