Editing
How to add aliases for frequently used commands
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
go back to [[Main Page]], [[Computational Resources]], [[Information & Help]], [[Chemistry & More]], [[Linux & Unix]] An '''Alias''' is a word that represents a command in your computer. Aliases allow you to define shortcuts and synonyms for commonly used shell commands. You can write aliases in your own PC or in your account on a cluster. You can add aliases by just typing alias newcommand='yourcommand -arguments' examples: alias q='qstat -u username' by doing this everytime you tipe q you will obtain the result of a qstat -u username, so you will have to type less letters to obtain the same output. alias B='cd /home/username/directoryA/diretoryB/' with this alias you will go from any directory in your PC to directoryB, just typing B. alias rm='rm -i' alias mv='mv -i' alias cp='cp -i' These three aliases are very popular and are useful to make sure you don't loose important information, by asking if you really want to remove, move and copy before doing it. A good option is to write the '''alias''' on your .bashrc or .bash_profile (in your home/username/), so you won't need to type it every time you open a new ssh session. (They will become active after executing the modified file:''' . .bash_profile''')
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information