Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# If running interactively, then:
if [ "$PS1" ]; then
# don't put duplicate lines in the history. See bash(1) for more options
# export HISTCONTROL=ignoredups
# Use the ~/.dir_colors file to determine colors associated with the ls command
eval `dircolors $HOME/.dir_colors`
# define some handy aliases
alias ls='ls --color=auto' # add color to ls
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
alias ll='ls -lh' # long listing format
alias la='ls -Ah' # list hidden files
alias l='ls -F' # append indicator (one of */=@|) to entries
alias rm='rm -i' # prompt before removing files
alias mv='mv -i' # prompt before overwriting files with the mv command
alias cp='cp -i' # prompt before overwriting files with the cp command
alias ..='cd ..' # to move to the parent directory just use ..
alias fetchmail='fetchmail -vk'
alias lynx='lynx -cfg ~/.lynx.cfg'
alias aterm='aterm +sb -sl 50% -bg black -fg white -fn 9x15'
alias p='$PWD'
# Add . to the PATH to execute files in the current directory
export PATH=$PATH:.
# Make sure bash tab completion is turned on
source /etc/bash_completion
###############################################
# The Prompt
# MyPrompt
# The first PS1 line is for X-Terminals and the second is for virtual terminals.
# \[\033]0;\u@\h \w\007\] puts the current working directory in the X-Terminal titlebar
function MyPrompt {
local GRAD1=`tty|cut -d/ -f3`
case $TERM in
*term* | rxvt )
PS1="\u@\h: \w > \[\033]0;\u@\h \w\007\]" ;;
*)
PS1="\u@\h: \w > ";;
esac
}
fi
MyPrompt
########## to use any of the prompts below comment out the MyPrompt above
# The following is the same as above with the addition of colors
# Define some colors first:
red='\033[0;31m'
RED='\033[1;31m'
green='\033[0;32m'
GREEN='\033[1;32m'
yellow='\033[0;33m'
YELLOW='\033[1;33m'
blue='\033[0;34m'
BLUE='\033[;1;34m'
purple='\033[0;35m'
PURPLE='\033[1;35m'
cyan='\033[0;36m'
CYAN='\033[1;36m'
white='\033[0;37m'
WHITE='\033[1;37m'
NC='\033[0m' # No Color
# To use, uncomment the following lines
#function AnotherPrompt {
#local GRAD1=`tty|cut -d/ -f3`
# case $TERM in
# *term* | rxvt )
#PS1="$GREEN\u@\h: \w >$NC \[\033]0;\u@\h \w\007\]" ;;
# *)
#PS1="$GREEN\u@\h: \w >$NC ";;
# esac
#}
#AnotherPrompt
#fi
################### a series of simple prompts
# Contains the username, hostname, and current directory
#PS1='\u@\h:\w\$ '
# Contains the username, current directory, and > instead of $
#PS1='\u:\w > '
# A simple colored prompt for both x-terminals and virtual terminals
#PS1="$CYAN\u:\w >$NC \[\033]0;\u@\h \w \007\]";
# A prompt with containing the current time
#PS1="$BLUE[$CYAN\$(date +%I:%M) \u \w$BLUE]$CYAN\$$NC \[\033]0;\u \w\007\]" ;;
###############################################
#!/bin/sh
# Print a fortune cookie for interactive shells:
#if [[ $- = *i* ]]; then
# echo
# fortune fortunes fortunes2 linuxcookie
# echo
# fi
Code:
# ~/.bash_profile: executed by bash(1) for login shells.
# I keep this file simple and put everything in ~/.bashrc
# Sets the default permissions for files. 755 for directories and 644 for files.
umask 022
# include the configurations from ~/.bashrc
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
export PATH=$PATH:/usr/X11R6/bin
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
export PATH=$PATH:/opt/kde/bin
just a sample