Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-02-2014, 08:08 PM   #31
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Member Response


You can setup a '.bash_profile' & '.bashrc' to support user understandable alias that can be descriptive to that user. This can help with repeated commands along with 'history' to aid within sessions. Please notice 'll' & 'listlong' below to 'ls l'. By placing abbreviated alias you will have association to the command to be executed. Plus you can add path(s) to the alias when needed. Big plus; 'KISS' (Keep It Simple Stupid') is a good rule to follow. Do not make the alias to descriptive.
I let them modify to suit their session needs. I do restrict 'sudo' rights for security reasons. SuperUser on my systems are restricted to me and only me.

My house, my rules!
I like to provide my users with this;
sample .bash_profile;  

~$ cat .bash_profile
# .bash_profile
#08-30-06 12:21

# Source .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
#-----------------cut end--------------
 And this,
cat .bashrc

#08-30-06 12:20

# Add bin to path
export PATH="$PATH:$HOME/bin"

# Dynamic resizing
shopt -s checkwinsize
#save bash history so as to share

shopt -s histappend
PROMPT_COMMAND='history -a'

# Custom prompt
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#08-29-06 11:40 gws
if [ `id -un` = root ]; then
PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] '
# Add color
eval `dircolors -b`
#Terminus is a very nice Unicode font for the Linux console
#02-02-12 gws
#from dugan's site

#04-30-12 11:41 removed
#if [ $TERM = "linux" ]; then
# setfont ter-v16n

# User defined aliases
alias cls='clear'
alias clls='clear; ls'
alias ll='ls -l'
alias listlong='ls -l'                        #Same as ll but enhance for understanding
alias lsa='ls -A'
alias lsg='ls | grep'
alias lsp='ls -1 /var/log/packages/ > package-list'
alias na='nano'
alias web='links -g -download-dir ~/'

#08-29-06 11:50

#To clean up and cover your tracks once you log off
#Depending on your version of BASH, you might have to use
# the other form of this command
 trap "rm -f ~$LOGNAME/.bash_history" 0

#The older KSH-style form
#trap 0 rm -f ~$LOGNAME/.bash_history
#-----------------cut end--------------
Agree that use will enhance experience as you work with the system. More than one way to skin a 'cat'.

Hope this helps.
1 members found this post helpful.
Old 04-04-2014, 08:00 AM   #32
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian, Arch
Posts: 1,163
Blog Entries: 7

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
^ Nice post ^

Just wanted to add this, came across it the other day:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do you remember the commands used in Linux From Scratch? TheIndependentAquarius Linux From Scratch 5 04-21-2012 12:35 PM
LXer: 15 Ways Nokia’s N900 Is Better Than Apple’s iPhone (and 5 ways it’s not) LXer Syndicated Linux News 0 11-14-2009 09:20 AM
Cant remember my commands for linux! dracable Linux - Newbie 4 11-19-2006 08:10 AM
I cant remember all these Linux commands!! BajaNick General 7 04-05-2004 05:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration