Skip to content

Instantly share code, notes, and snippets.

@k7faq
Created May 6, 2017 21:18
Show Gist options
  • Select an option

  • Save k7faq/b630793ee1ad8460267a93947e9d75da to your computer and use it in GitHub Desktop.

Select an option

Save k7faq/b630793ee1ad8460267a93947e9d75da to your computer and use it in GitHub Desktop.
Alias
.bashrc
alias messagelog = “tail -f /var/log/messages”
export MYNAME =”Steven”
environment variables
$ export CUSTOM_LOG=”/custom/log/” ← to set a variable from command line
$ echo $CUSTOM_LOG ← to obtain settings
$ echo “MY log message” > $CUSTOM_LOG/mylog.txt ← place content in file
$ unset CUSTOM_LOG
command prompt
$ export PS1
\j = jobs
\t = time
\h = host
\W = working directory
\u = user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment