.bashrc for Windows 10 BASH - (will work with all UNIX-like systems - check paths, especially to executables)
# . ~/.bashrc: executed by bash(1) for non-login shells.
# adjusted for Win10 BASH - 19 July 2017 - will work in all Unix-like shells
# set Path, Prompt, Permissions, History, Editor, Alias, Shell options and Functions
#======================================================================================
#
export PATH=$PATH:/sbin/:/usr/sbin:/usr/local/sbin:/etc:~/bin:~:.
#======================================================================================
# W10 BASH DEFAULT=($PATH): /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
#======================================================================================
#
export PS1="
------------------------------------------------
$(whoami)@`hostname` [\$PWD]
------------------------------------------------
--> "
#======================================================================================
#
umask 022
# umask 022 sets new files: 644 & dirs: 755
#======================================================================================
#
if [ ! -d ~/.History ] # tests for directory, if not, then...
then
/bin/mkdir ~/.History
/bin/echo "history directory made"
fi
#
HISTFILE="~/.History/`/bin/date '+%Y_%b_%d_%H:%M'.history`" ; export HISTFILE
HISTSIZE=2048; export HISTSIZE
#======================================================================================
#
EDITOR=/usr/bin/vi; export EDITOR
VISUAL=/usr/bin/vi; export VISUAL
#
set -o vi
#======================================================================================
#
alias l="/bin/ls -al"
alias ll="/bin/ls -l"
alias lm="/bin/ls -l | more"
alias md="/bin/mkdir -p"
alias mv="/bin/mv -i"
alias cp="/bin/cp -i"
alias rm="rm -i"
alias mroe=more # add any other words you mistype often
alias dfh='/bin/df -h | /usr/bin/grep disk' # modify to show primary file systems
alias vi="/usr/bin/vim"
#======================================================================================
#
shopt -s histverify
shopt -s checkwinsize
#======================================================================================
#
function dir-mkcd () { mkdir -p "$@" && eval cd "\"\$$#\""; }
# creates a directory structure and changes to the lowest level
#######################################################################################
# .exrc settings:
# set tabstop=4 shiftwidth=4 expandtab
# syntax off
# set ruler
#######################################################################################
|
|
![]() Wagoneers FULL SIZE JEEPS JeepMeister "Jeep is America's -Enzo Ferrari MeisterTech Diesels + |
One Page Overview of Linux Commands click for an image of the 5 essential Linux commands An Intro to Linux |
at Midway Auto on SR9 in Snohomish, or at Northland Diesel in Bellingham, WA |