Very nice Bash shell prompt I came up with.

This is a very nice bash shell prompt I came up with. PS1="▩\[\033[38;5;33m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;79m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;174m\]\w\[$(tput sgr0)\]\n┗╼╼╼╼> \[$(tput sgr0)\]\[\033[38;5;82m\]\v\[$(tput sgr0)\] ┋► \[$(tput sgr0)\]\[\033[38;5;36m\]\\$ \[$(tput sgr0)\] \[$(tput sgr0)\]"PS1="▩\[\033[38;5;33m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;79m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;174m\]\w\[$(tput sgr0)\]\n┗╼╼╼╼> \[$(tput sgr0)\]\[\033[38;5;82m\]\v\[$(tput sgr0)\] ┋► \[$(tput sgr0)\]\[\033[38;5;36m\]\\$ \[$(tput sgr0)\] \[$(tput sgr0)\]" This is what this prompt looks like in action. You can use … Read more

How to have a blinking $ sign in your Linux prompt. This is very interesting indeed.

This is my current Linux shell prompt. This will show the current Github branch if you are in the folder containing a Git project. But I have added something cool. git_branch() { git branch 2> /dev/null | sed -e ‘/^[^*]/d’ -e ‘s/* \(.*\)/(\1)/’ }   PS1=’┌──[\[\033[38;5;160m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;75m\]\H\[$(tput sgr0)\]]─[\w]\n└──╼ $(git_branch) ╼ \[\033[34;5;9m\]\$\[$(tput sgr0)\] ‘git_branch() { … Read more

How to have a nice bash shell prompt that will print the current git branch on the prompt.

This interesting bash function will get the git branch of the current working directory and then print it in the shell prompt. This could be very useful for a programmer. git_branch() { git branch 2> /dev/null | sed -e ‘/^[^*]/d’ -e ‘s/* \(.*\)/(\1)/’ }   PS1=’┌──[\u@\h]─[\w]\n└──╼ $(git_branch) ╼ \$ ‘git_branch() { git branch 2> /dev/null … Read more

Set a very nice Linux shell prompt and very useful aliases.

This addition to your .bashrc file will give you a very nice shell prompt and colorful output of the ls command. This looks very stylish indeed. # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi   … Read more

Very nice bash shell prompt and other useful Linux information.

Very nice bash shell prompt This is a very useful Linux shell prompt with color. export PS1="\[\033[38;5;165m\]\d\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;51m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;84m\]\H\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]:\l>\[$(tput sgr0)\]\[\033[38;5;231m\]\\$\[$(tput sgr0)\] "export PS1="\[\033[38;5;165m\]\d\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;51m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;84m\]\H\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]:\l>\[$(tput sgr0)\]\[\033[38;5;231m\]\\$\[$(tput sgr0)\] " This prompt will look like this. Mon Mar 30 ~ Yog-Sothoth@jason:0>$ This is … Read more

Very nice bash PS1 prompts.

A complex, but very useful bash shell prompt. PS1=$( sep=$'\xC2\xBB' # UTF-8 U+00BB red=$(tput setaf 1) green=$(tput setaf 2) yellow=$(tput setaf 3) blue=$(tput setaf 4) cyan=$(tput setaf 5) bold=$(tput bold) reset=$(tput sgr0) [[ $EUID -eq 0 ]] && user=$red || user=$green echo "\[$user\]\u@\h\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$yellow\]\W\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$user\]\$\[$reset\] ") Gives the user a prompt that looks … Read more

How to list files with ls that start with letters in the filename and then have numbers.

This is how to list some filenames that start with letters and have some numbers in the filenames. This is a very useful Linux trick. jason@Yog-Sothoth » ~ » $ ls -l [A-Z]*[0-9]*.wav -rw-rw-r– 1 jason jason 4399528 Oct 25 2017 gqrx_20171024_232212_33050000.wav -rw-rw-r– 1 jason jason 2378004 Oct 29 2017 gqrx_20171029_001507_126954900.wav -rw-rw-r– 1 jason jason … Read more

Macintosh OSX Sierra vulnerable to a moronic security bug.

The Macintosh Sierra operating system from Apple is vulnerable to a moronic security vulnerability. The user only needs to open a username/password prompt that requires elevation to perform a task and then enter the username ‘root’ and leave the password field blank. Then just click unlock twice, and the user will be granted root access … Read more

Useful bash shell prompt with customizable colors that are switchable on the fly.

This bash script will give you a custom bash prompt that has colors that are switchable on the fly. PS1=$( sep=$’\xC2\xBB’ # UTF-8 U+00BB red=$(tput setaf 1) green=$(tput setaf 2) yellow=$(tput setaf 3) blue=$(tput setaf 4) cyan=$(tput setaf 5) bold=$(tput bold) reset=$(tput sgr0)   [[ $EUID -eq 0 ]] && user=$red || user=$green   echo … Read more