NOTE, lines or sections preceded by "#" are comments and nothing to the right will work.

COPY STARTING HERE:

################################## john's .bashrc 27 Jul 2023 ################### # the .bashrc file sets useful user configurations related to: # Path, Prompt, Permissions, History, Editor, Alias, Shell options and Functions # http://johnmeister.com/linux/bashrc-basic.html ################################################################################### # PATH: # export PATH=$PATH:~/bin:~:. # ## from /etc/login.defs: ## *REQUIRED* The default PATH settings, for superuser and normal users. ## NO NEED TO ADD THE PATHS FOUND in ENV_PATH which are: PATH=/usr/local/bin:/usr/bin:/bin ## ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin # # FOR BASIC USER: NOTE: CHECK THE "tilde" (~) it does NOT always copy over, replace it with the path! # recommended only for more ADVANCED users: (NOTE THE TILDE - it might not copy correctly!) # export PATH=$PATH:~/bin:/sbin:/usr/sbin:/usr/local/sbin:~:. #====================================================================================== # PROMPT: # export PS1=" ------------------------------------------------ $(whoami)@`hostname` [\$PWD] ------------------------------------------------ --> " # #====================================================================================== # PERMISSIONS: # umask 022 # # note: umask 022 sets new files: 644 & dirs: 755 #====================================================================================== # HISTORY: (suggest replacing the tilda (~) with the full path!) # if [ ! -d ~/.History ] # note: tests for directory, if not, then... then mkdir ~/.History echo "history directory made" fi # #====================================================================================== # note: creates a history file for each instance e.g.: 2017_10_Oct_01_1515.history #====================================================================================== # HISTFILE="~/.History/`date '+%Y_%m_%b_%d_%H:%M'.history`" ; export HISTFILE HISTSIZE=2048; export HISTSIZE # default is usually 1024, acceptable # #====================================================================================== # note: on MacOSx, block appendable history: SHELL_SESSION_HISTORY=0 #====================================================================================== # EDITOR: # set -o vi # #====================================================================================== # note: using set -o vi allows recall of commands via vi commands and inline editing #====================================================================================== # note: verify location by typing: which vi (often systems will link /bin to /usr/bin) # not resolving the path to commands will work ok. NOT all systems have VIM # see: http://johnmeister.com/linux/FileSystems/Linux-bashrc-vim-differences.jpg #====================================================================================== # EDITOR=vi; export EDITOR VISUAL=vi; export VISUAL # #====================================================================================== # note optional aliases - use to create simple commands or alternate OS commands #====================================================================================== # ALIAS: # alias l="ls -al" ; alias ll="ls -l" # NOTE: you can separate commands with ; (semicolon) alias lm="ls -l | more" alias md="mkdir -p" ## creates full path alias mv="mv -i" ## -i prevents overwriting files, use full path or \ to override alias cp="cp -i" ## -i prevents overwriting files, use full path to override alias rm="rm -i" ## -i prevents overwriting files, use full path to override alias dfh='df -h | grep disk' ## modify to show primary file systems, YMMV - test alias vi="vim" ## type which vi or which vim, set accordingly (not on Cygwin and Debian) alias mroe=more ## add any other words you mistype often # #======================================================================================= # SHELL OPTIONS: # shopt -s histverify ## allows recall historical commands, edit, then use, type: history shopt -s checkwinsize ## checks and adjusts window size # #========================================================================================== # FUNCTIONS: # creates a directory structure and changes to the lowest level - be aware of KEYWORDS and COMMANDS # function dir-mkcd () { mkdir -p "$@" && eval cd "\"\$$#\""; } # #========================================================================================== # ADDITIONAL NOTES - for user configuration # 1) setup: create .exrc (or .vimrc) (configuratin file for the vi editor - ex is an editor in vi) # set tabstop=4 shiftwidth=4 expandtab # syntax off # set ruler # ----------------------------------- # tabstops - determines how many spaces per tab (normal is 5) # shiftwidth - determines shift width, on type writers there were tabs, and tabstops, manually set # rule - provides digital count of lines and spaces in lower right - very useful! # ------- # norule - (: set norule ) turns off lines, characters and page % # number - (: set nu) puts line numbers on left (not included in print or file save) # nonumber - (: set nonu ) # ----------------------------------- # 2) FIVE BASIC COMMANDS: # 1) man (also: --help, e.g. man --help ) # 2) ls (also: ls -al and ls -Al) (note: 26 letters, upper and lower case) # 3) cd (type: which cd ) (NOTE: this is not a command, but a shell built-in) # 4) pwd (print working director) # 5) more (more is recommened, but less is more, both better than cat, because...) # ----------------------------------- # 3) configure .ssh if using more than one Linux or MacOSX system # see http://johnmeister.com/linux/Notes/SSH/quick-ssh.html # mkdir .ssh ; cd .ssh ; ssh-keygen ; cp id_rsa.pub id_rsa.HOSTNAME # ----------------------------------- # 4) some useful commands: # 1) When copying a file, append the date: cp FILE FILE-`date +'%Y-%m-%b-%d'` # 2) Use rsync to completely replace a local directory with that from another system as a backup # use trailing "/" to prevent creating a new directory structure, and only use --delete if you want # to remove old files locally. This is a very dangerous command - useful if you use more than one system # rsync -av --delete --progress :/home/luser/somedir/ /home/luser/localdir/ # e.g.# rsync -av --delete --progress 192.168.11.99:/home/luser/files/ /home/luser/files/ #==========================================================================================
STOP COPYING AT LAST COMMENT ABOVE for additional functions for searching text files with REGular EXpressions, see also: http://johnmeister.com/linux/REGEX for useful functions for searching text files with REGular EXpressions.

additional notes:

# to source, or update configuration, type: . ~/.bashrc or from home dir: . ./.bashrc # # adjusted for Win10 BASH - 19 July 2017 - works for all Unix-like shells - check paths #========================================================================================= # setup: Path, Prompt, Permissions, History, Editor, Alias, Shell options and Functions #========================================================================================= # do NOT use ~(tilde) .(period) for root user. To overwrite default PATH, remove $PATH # # W10 BASH DEFAULT=($PATH): /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

JohnMeister.com Today's Date:




fotomeister:john's favorite fotos


@meistertech youtube channel


Study the Bible on line

Bible Basics: an 8 section guide to understanding the Bible
on line here: HTML version Or view in PDF format.
Available at e-book retailers around the world in multiple formats.
Study Guide:(out of print-2023) The Art of LINUX Sys Admin
john's O'Reilly author info
e-books by john
published e-books by john:
Bible Basics  Full Size Jeep Buyer's Guide Simply Linux: Basics Linux Tackles Microsoft
Mac and Jack - the tail of two kitties Using BASH on Windows 10 Using BASH on Windows 10 - LITE VERSION
Practical Suggestions for Microsoft Windows

Linux Overview
-- bashrc and basics
The vi editor -- Linux notes
Scripting -- Filesystems
OS performance info -- Sys Admin

STUDY the Bible    ...in ONE year
...in Chronological Order
Parallel Bible for Study
Israel National News -- BBC: MidEast
Der Spiegel -- Voice of the Martyrs
News Links -- Jihadwatch.org

these links updated: 2023-01-02
overview of mankind's history
"Promises and Prophets"

Study the Bible.
Study the Bible with English, German and Greek.
verse by verse teachings on MP3
Details of the Passover week

THURSDAY on the cross...

BibleTech: multiple languages in parallel
FULL SIZE JEEP

Buyer's Guide


SJ Jeeps

"Jeep is America's
only real sports car."
-Enzo Ferrari

Mercedes, VW, and other Diesels
Nikon cameras -- and other general tech info

Bibletech.net
NW pollen count
Seattle traffic
Bridge Christian Fellowship mp3 teachings
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983

purchase AMSOIL and have it installed locally in Western Washington at the following locations, CALL ahead to have your specific AMSOIL products made available at:

- Northland Diesel 360.676.1970 - Bellingham, WA
- Fleet Services 425-355-4440 -Everett, WA
- and Dalton's 360-386-8571 - Marysville, WA

Or follow the link above/call the toll free number, and have delivered directly.
Please use Customer Number 283461, thank you.



SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)