Advertisement
Jackspade9624

.bashrc kali

Jun 1st, 2025
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. # for examples
  4.  
  5. # If not running interactively, don't do anything
  6. case $- in
  7. *i*) ;;
  8. *) return;;
  9. esac
  10.  
  11. # don't put duplicate lines or lines starting with space in the history.
  12. # See bash(1) for more options
  13. HISTCONTROL=ignoreboth
  14.  
  15. # append to the history file, don't overwrite it
  16. shopt -s histappend
  17.  
  18. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  19. HISTSIZE=1000
  20. HISTFILESIZE=2000
  21.  
  22. # check the window size after each command and, if necessary,
  23. # update the values of LINES and COLUMNS.
  24. shopt -s checkwinsize
  25.  
  26. # If set, the pattern "**" used in a pathname expansion context will
  27. # match all files and zero or more directories and subdirectories.
  28. #shopt -s globstar
  29.  
  30. # make less more friendly for non-text input files, see lesspipe(1)
  31. #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  32.  
  33. # set variable identifying the chroot you work in (used in the prompt below)
  34. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  35. debian_chroot=$(cat /etc/debian_chroot)
  36. fi
  37.  
  38. # set a fancy prompt (non-color, unless we know we "want" color)
  39. case "$TERM" in
  40. xterm-color|*-256color) color_prompt=yes;;
  41. esac
  42.  
  43. # uncomment for a colored prompt, if the terminal has the capability; turned
  44. # off by default to not distract the user: the focus in a terminal window
  45. # should be on the output of commands, not on the prompt
  46. force_color_prompt=yes
  47.  
  48. if [ -n "$force_color_prompt" ]; then
  49. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  50. # We have color support; assume it's compliant with Ecma-48
  51. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  52. # a case would tend to support setf rather than setaf.)
  53. color_prompt=yes
  54. else
  55. color_prompt=
  56. fi
  57. fi
  58.  
  59. # The following block is surrounded by two delimiters.
  60. # These delimiters must not be modified. Thanks.
  61. # START KALI CONFIG VARIABLES
  62. PROMPT_ALTERNATIVE=twoline
  63. NEWLINE_BEFORE_PROMPT=yes
  64. # STOP KALI CONFIG VARIABLES
  65.  
  66. if [ "$color_prompt" = yes ]; then
  67. # override default virtualenv indicator in prompt
  68. VIRTUAL_ENV_DISABLE_PROMPT=1
  69.  
  70. prompt_color='\[\033[;32m\]'
  71. info_color='\[\033[1;34m\]'
  72. prompt_symbol=㉿
  73. if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user
  74. prompt_color='\[\033[;94m\]'
  75. info_color='\[\033[1;31m\]'
  76. # Skull emoji for root terminal
  77. #prompt_symbol=💀
  78. fi
  79. case "$PROMPT_ALTERNATIVE" in
  80. twoline)
  81. PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_col>
  82. oneline)
  83. PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}'$info_color'\u@\h\[\033[00m\]:'$prompt_color'\[\033[01m>
  84. backtrack)
  85. PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033>
  86. esac
  87. unset prompt_color
  88. unset info_color
  89. unset prompt_symbol
  90. else
  91. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  92. fi
  93. unset color_prompt force_color_prompt
  94.  
  95. # If this is an xterm set the title to user@host:dir
  96. case "$TERM" in
  97. xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
  98. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  99. ;;
  100. *)
  101. ;;
  102. esac
  103.  
  104. [ "$NEWLINE_BEFORE_PROMPT" = yes ] && PROMPT_COMMAND="PROMPT_COMMAND=echo"
  105.  
  106. # enable color support of ls, less and man, and also add handy aliases
  107. if [ -x /usr/bin/dircolors ]; then
  108. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  109. export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
  110.  
  111. alias ls='ls --color=auto'
  112. #alias dir='dir --color=auto'
  113. #alias vdir='vdir --color=auto'
  114.  
  115. alias grep='grep --color=auto'
  116. alias fgrep='fgrep --color=auto'
  117. alias egrep='egrep --color=auto'
  118. alias diff='diff --color=auto'
  119. alias ip='ip --color=auto'
  120.  
  121. export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
  122. export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
  123. export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
  124. export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
  125. export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
  126. export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
  127. export LESS_TERMCAP_ue=$'\E[0m' # reset underline
  128. fi
  129.  
  130. # colored GCC warnings and errors
  131. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  132.  
  133. # some more ls aliases
  134. alias ll='ls -l'
  135. alias la='ls -A'
  136. alias l='ls -CF'
  137.  
  138. # Alias definitions.
  139. # You may want to put all your additions into a separate file like
  140. # ~/.bash_aliases, instead of adding them here directly.
  141. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  142.  
  143. if [ -f ~/.bash_aliases ]; then
  144. . ~/.bash_aliases
  145. fi
  146.  
  147. # enable programmable completion features (you don't need to enable
  148. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  149. # sources /etc/bash.bashrc).
  150. if ! shopt -oq posix; then
  151. if [ -f /usr/share/bash-completion/bash_completion ]; then
  152. . /usr/share/bash-completion/bash_completion
  153. elif [ -f /etc/bash_completion ]; then
  154. . /etc/bash_completion
  155. fi
  156. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement