Zuletzt geändert am 14. August 2022 um 18:41

.bashrc / alias

# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h\033[0m - \t:\n\[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
# umask 022

############################################################################# 

eval "`dircolors`"

#############################################################################

## Colorize the ls output ##
alias ls='ls $LS_OPTIONS'
alias ll='ls -la $LS_OPTIONS'
alias l='ls -lA $LS_OPTIONS'

## a quick way to get out of current directory ##
alias ..='cd ..'
alias ...='cd ../..'

# custom
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias update='apt update && apt upgrade'
alias mtr='mtr --aslookup --show-ips'

## 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'

## login as other user ##
alias su='su -'

## Show open ports ##
alias ports='netstat -atunp'

## display all rules ##
alias iptlist='iptables -L -n -v --line-numbers'
alias ipt6list='ip6tables -L -n -v --line-numbers'
alias iptlistin='iptables -L INPUT -n -v --line-numbers'
alias iptlistout='iptables -L OUTPUT -n -v --line-numbers'
alias iptlistfw='iptables -L FORWARD -n -v --line-numbers'

#############################################################################

export EDITOR="nano"
export HISTFILESIZE=99999999
export HISTSIZE=99999999
export HISTCONTROL="ignoreboth"
export LS_OPTIONS='--color=auto --time-style=long-iso -h'

#############################################################################