10.1.1 Getting started with LinuxAmber MD is software that is entirely based on a Command Line Interface (CLI) on a computer with Linux. To run Amber, you will need to open a terminal.
1. Open a terminal window now on your Linux computer.
On most Linux machines, your terminal will look like this:
List files and make a directory (folder) to store your files inWhen you first log in and start a terminal, your current working directory (or folder) is your home directory. It has the same name as your username, and it is where your files and directories are stored. In most cases, this is /home/username
ls (list)2. Use the ls command to list what is in your current directory.
Note that the "$" is the command line prompt in the terminal.
$ lsAt this point there will probably be some files and directories in your home directory that are created automatically with your account. Alternatively, "ls -l" can be used here to show the file sizes and the associated permissions.
mkdir (make directory)You'll need a new directory for the files and folders created in this tutorial.
3. Make a new directory for this tutorial with the mkdir command called Tutorial.
$ mkdir TutorialNow when you do ls you should see your new directory has been created.
cd (change directory)At this point, you'll want to move into your Tutorial directory so that you can save all of your working files there.
4. Use the cd command to change to different directory.
$ cd TutorialThere is a special directory named "..". This means the parent of the current directory or simply "up" one directory. So to return to the parent of the Tutorial directory use cd ..
$ cd ..If you ever need to return to your home directory use just the cd command by itself. Tilde "~" is a shortcut to your home directory. The following commands both change directory to your home directory.
$ cd ~
pwd (print working directory)Pathnames describe what directory you are in relative to the entire computer's filesystem. Your home directory has a location within the entire filesystem.
5. Print the working directory pathname of your home directory with pwd.
$ cdThis is the current working directory that you're located in. In this case the directory username is in the directory home which is in the / (root) directory.
Command ListHere are a list of other commands and their functions:
||changes to a specified directory
cd /usr/local/bin (only system directories need the first slash)
cd ~amberuser1 (changes to the username’s directory)
||changes up two directories
||change to last directory
|cp filename newfile
||copies a file to a new filename
||cp test.in newtest.in
||gzips (compresses) a file
||gunzips (uncompresses) a file
||lists the directory contents
||lists the directory contents and also shows the size of files and the permissions
||like ls –l except it also shows all filenames beginning with a period.
||make a directory
||View a file
(Shift-G - go to end; b-back 1 page; space bar – forward one page)
|mv filename newfile
||moves a file from one place to another
||mv test.in newstuff/newtest.in (moves test.in to the directory newstuff and calls it a new name newtest.in)
mv test.in newstuff/ (moves test.in to the directory newstuff and keeps the same name test.in)
||tells you which directory you are in
||removes a file or directory
||remove a file or directory and all its contents without prompting for a confirmation
||rm –fr allmystuff
||remove a file with a prompt for a confirmation
||rm –I allmystuff
Note:Its recommended that you set this as your default in your .alias file or your .cshrc file
||removes a directory and all its contents with a prompt for confirmation
||rm –r allmystuff
|tar –cvf name.tar directory or list of filenames
||Create an archive (one file) of a directory or list of files
||tar –cvf archiveI.tar allmystuff
tar –cvf archiveI.tar test.in test2.in
|tar –xvf name.tar
||Extract an archive file
||tar –xvf archiveI.tar
||tells you the alias for the command