Last active
March 28, 2018 12:31
-
-
Save keinwort/61a28e9e0d01f76c5a2349095bcffe1d to your computer and use it in GitHub Desktop.
dotfile debian .bashrc #debian #linux #bash #dotfile #xterm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @linux debian | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# "source ./.bashrc" or ". ~/.bashrc" (for reloading the shell) | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# export PS1='\h:\w\$ ' | |
# export PS1='\u@\h: \w\$ ' | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[0;36m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\w\[\033[00m\]\n└─╼ \$ ' | |
### yellow name prompt | |
export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[33m\]\u@\h\[\033[0;32m\]: \[\033[01;34m\]\w\[\033[0;32m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
### red name prompt | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[31m\]\u@\h\[\033[0;00m\]: \[\033[01;34m\]\w\[\033[0;00m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
### light red name prompt | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[91m\]\u@\h\[\033[0;00m\]: \[\033[01;34m\]\w\[\033[0;00m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
### cyan name prompt | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[36m\]\u@\h\[\033[0;00m\]: \[\033[01;34m\]\w\[\033[0;00m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
### light magenta name prompt | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[95m\]\u@\h\[\033[0;00m\]: \[\033[01;34m\]\w\[\033[0;00m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
### magenta name prompt | |
# export PS1='\[\033[0;34m\][\t]>${debian_chroot:+($debian_chroot)}\[\033[35m\]\u@\h\[\033[0;00m\]: \[\033[01;34m\]\w\[\033[0;00m\]\n└─╼ $(if [[ $? == 0 ]]; then echo "\[\033[32m\]✓"; else echo "\[\033[31m\]✗"; fi) \[\033[31m\]\$\[\033[0;32m\] ' | |
umask 022 | |
# export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LANGUAGE=en_US.UTF-8 | |
# colored GCC warnings and errors | |
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | |
# You may uncomment the following lines if you want `ls' to be colorized: | |
export LS_OPTIONS='--color=auto' | |
eval "`dircolors`" | |
# aliases | |
alias ls='ls $LS_OPTIONS -F' | |
alias l='ls $LS_OPTIONS -lF' | |
alias la='ls $LS_OPTIONS -laF' | |
alias dir='dir $LS_OPTIONS' | |
alias vdir='vdir $LS_OPTIONS' | |
alias grep='grep $LS_OPTIONS' | |
alias fgrep='fgrep $LS_OPTIONS' | |
alias egrep='egrep $LS_OPTIONS' | |
# commands | |
alias aptgetups='apt-get update && apt-get dist-upgrade' | |
alias aptups='apt update && apt -a list --upgradable && apt full-upgrade' | |
alias aptar='apt autoremove' | |
alias apttest='apt -s install ' | |
alias aptinst='apt install ' | |
alias winver='lsb_release -a && uname -a && uname -r' # (-; | |
alias jrl='journalctl -f -n10000 -o short-iso' | |
alias jrlboot='journalctl -l -b -o short-iso' | |
alias jrlnamed='journalctl -u bind9.service -f -n1000 -o short-iso' | |
#alias shutup='shutdown -h now' | |
# navigation | |
alias cd..='cd ..' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
### too hard to remember keycombo for "~" on a mac | |
alias cd-h='cd ~/' | |
# Some more alias to avoid making mistakes: | |
#alias rm='rm -i' | |
#alias cp='cp -i' | |
#alias mv='mv -i' | |
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them here directly. | |
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
# (x)term windowtitle | |
PROMPT_COMMAND='echo -ne "\033]0;$LOGNAME@${HOSTNAME}: ${PWD}\007"' | |
# .history things | |
HISTSIZE=10000 | |
HISTFILESIZE=2000 | |
# NO dupes in bash_history | |
HISTCONTROL=ignoreboth:erasedups | |
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:history:bashrc:"; | |
# append to the history file, don't overwrite it (which is best? to test) | |
#PROMPT_COMMAND="history -a; history -n history -w; $PROMPT_COMMAND" | |
shopt -s histappend | |
PROMPT_COMMAND="history -w; history -c; history -r; $PROMPT_COMMAND" | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# enable programmable completion features (you don't need to enable | |
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
# sources /etc/bash.bashrc). | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
## following lines for kali-linux-rolling | |
##Linux HOSTNAME 4.12.0-kali1-amd64 #1 SMP Debian 4.12.6-1kali6 (2017-08-30) x86_64 GNU/Linux 4.12.0-kali1-amd64 | |
export TERM=xterm-256color | |
### set env for ssh-agent (overwrite) startet via systemd | |
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment