-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases-Fedora
85 lines (64 loc) · 2.32 KB
/
.bash_aliases-Fedora
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
###
# .bash_aliases by Linutux
# https://gitlab.com/Linutux/bash-aliases-linutux
###
### Shorten typical commands
alias a='sudo aptitude'
alias d='dir'
alias e='gedit'
alias f='firefox'
alias n='nautilus .'
alias r='rails'
#alias rcopy='rsync --partial --progress --append -r -h'
#alias rmove='rsync --partial --progress --append -r -h –-remove-sent-files'
## Colorize the ls output ##
alias ls='ls --color=auto'
## Use a long listing format ##
alias ll='ls -la --color=auto'
## Use grep on a long listing format ##
alias llg='ll | grep --color=auto'
## Show hidden files ##
alias l.='ls -d .* --color=auto'
## get rid of command not found ##
alias cd..='cd ..'
## a quick way to get out of current directory ##
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias .3='cd ../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
## make and remove directories ##
alias md='mkdir -p'
alias rd='rmdir'
## Colorize the grep command output for ease of use (good for log files) ##
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# Generate SSH1 Hash
alias sha1='openssl sha1'
# Show open ports
alias ports='netstat -tulenp'
## shortcut for iptables and pass it via sudo#
alias ipt='sudo /sbin/iptables'
## display all rules ##
alias iptlist='sudo /sbin/iptables -L -n -v --line-numbers'
alias iptlistin='sudo /sbin/iptables -L INPUT -n -v --line-numbers'
alias iptlistout='sudo /sbin/iptables -L OUTPUT -n -v --line-numbers'
alias iptlistfw='sudo /sbin/iptables -L FORWARD -n -v --line-numbers'
alias firewall=iptlist
## get web server headers ##
alias header='curl -I'
## find out if remote server supports gzip / mod_deflate or not ##
alias headerc='curl -I --compress'
## upgrade via aptitude ##
alias upgrade='sudo dnf upgrade'
## remove old kernels via aptitude ##
#alias remove-old-kernels="sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge"
## don't use Pubkey-Authentication with SSH ##
alias ssh-nopub='ssh -o PubkeyAuthentication=no'
## alias mtr to /usr/bin/mtr to use sudoless execution via sudoers file ##
alias mtr='/usr/bin/mtr'
## make vim the default editor for visudo ##
alias visudo='sudo EDITOR=vim visudo'