Advertisement
Jackspade9624

.bashrc kali

Apr 14th, 2025 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. GNU nano 8.3 .bashrc # ~/.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 color_prompt=
  55. fi fi
  56.  
  57. # The following block is surrounded by two delimiters.
  58. # These delimiters must not be modified. Thanks.
  59. # START KALI CONFIG VARIABLES
  60. PROMPT_ALTERNATIVE=twoline
  61. NEWLINE_BEFORE_PROMPT=yes
  62. # STOP KALI CONFIG VARIABLES
  63.  
  64. if [ "$color_prompt" = yes ]; then
  65. # override default virtualenv indicator in prompt
  66. VIRTUAL_ENV_DISABLE_PROMPT=1
  67.  
  68. prompt_color='\[\033[;32m\]'
  69. info_color='\[\033[1;34m\]'
  70. prompt_symbol=㉿
  71. if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user
  72. prompt_color='\[\033[;94m\]'
  73. info_color='\[\033[0;34m\]'
  74. # Skull emoji for root terminal
  75. #prompt_symbol=💀
  76. fi
  77. case "$PROMPT_ALTERNATIVE" in
  78. twoline)
  79. PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_color'\u'$prompt_symbol'kali'$prompt_color')-[\[\033[1;96m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[1;97m\] ';;
  80. oneline)
  81. PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}'$info_color'\u@\h\[\033[00m\]:'$prompt_color'\[\033[01m\]\w\[\033[00m\]\$ ';;
  82. backtrack)
  83. PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ';;
  84. esac
  85. unset prompt_color
  86. unset info_color
  87. unset prompt_symbol
  88. else
  89. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  90. fi
  91. unset color_prompt force_color_prompt
  92.  
  93. # If this is an xterm set the title to user@host:dir
  94. case "$TERM" in
  95. xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
  96. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  97. ;;
  98. *)
  99. ;;
  100. esac
  101.  
  102. [ "$NEWLINE_BEFORE_PROMPT" = yes ] && PROMPT_COMMAND="PROMPT_COMMAND=echo"
  103.  
  104. # enable color support of ls, less and man, and also add handy aliases
  105. if [ -x /usr/bin/dircolors ]; then
  106. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  107. export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
  108. alias ls='ls --color=auto'
  109. #alias dir='dir --color=auto'
  110. #alias vdir='vdir --color=auto'
  111. alias grep='grep --color=auto'
  112. alias fgrep='fgrep --color=auto'
  113. alias egrep='egrep --color=auto'
  114. alias diff='diff --color=auto'
  115. alias ip='ip --color=auto'
  116.  
  117. export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
  118. export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
  119. export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
  120. export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
  121. export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
  122. export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
  123. export LESS_TERMCAP_ue=$'\E[0m' # reset underline
  124. fi
  125.  
  126. # colored GCC warnings and errors
  127. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  128.  
  129. # some more ls aliases
  130. alias ll='ls -l'
  131. alias la='ls -A'
  132. alias l='ls -CF'
  133.  
  134. # Alias definitions.
  135. # You may want to put all your additions into a separate file like
  136. # ~/.bash_aliases, instead of adding them here directly.
  137. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  138.  
  139. if [ -f ~/.bash_aliases ]; then
  140. . ~/.bash_aliases
  141. fi
  142.  
  143. # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  144. # sources /etc/bash.bashrc).
  145. if ! shopt -oq posix; then
  146. if [ -f /usr/share/bash-completion/bash_completion ]; then
  147. . /usr/share/bash-completion/bash_completion
  148. elif [ -f /etc/bash_completion ]; then
  149. . /etc/bash_completion
  150. fi
  151. fi
  152.  
  153. export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  154. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement