SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to add my own commands such as alias "c=clear". I want to make this shortcut remain after restart! Where should I add this command? (I am using slackware 10 with dropline gnome)
In your home directory, create .bash_profile if it doesn't exist. Ensure that the .bash_profile has:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
inside of it.
Create .bashrc in your home directory, and list any aliases you'd like.
I've attached my .bashrc for examples. (note: make sure to logoff/login to reload the .bashrc file.)
alias ..='cd ..'
alias laser='lpr -P Laser'
alias c='clear'
alias l='ls -l'
alias la='ls -Al'
alias ls='ls -hF --color'
alias lx='ls -lXB'
alias lk='ls -lSr'
alias lc='ls -lcr'
alias lu='ls -lur'
alias lr='ls -lR'
alias lt='ls -ltr'
alias lm='ls -al | more'
alias print_pdf='lpr -P Print_PDF'
alias mkdir='mkdir -p'
alias pg='ps aux | grep'
alias q='postqueue -p'
alias r_bash='~/.bashrc'
alias r_apache='apachectl stop && apachectl startssl'
alias r_postfix='postfix reload'
alias work='ssh -l mdarby proxy.dynamix-ltd.com'
alias t='clear && tail -f'
alias tree='tree -su'
Originally posted by SizofreNICK First I want to thank you for your reply!
Second. I usually logged with root. Because I can't reach my files which are in my NTFS partitions, if I logged in any user.
Where should I put the .bashrc when I logged as root?
Thank you again!
Logging is as root is a terrible idea, IMHO. All services and programs are ran as root, which means any exploit will have root privledges. Also, you could potentially delete necessary system files as root.
If I were you, I'd go edit my /etc/fstab and make it readable by anybody, assuming you only have 1 other user. Mine looks like this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.