New to linux ?
If you are new to linux, there a some new ways of working, and a bit of jargon that you need to understand.
You can find a lot of details and examples here - it is worth working through it when you have time.
Below are ome basics to get you started.
Command Line
Rather than clicking on options in a GUI (graphical user interface), you type commands at the command line, within a terminal window. The command line doesn't support dragging and dropping.
The terminal window is usually a black window with white writing. If you don't like the colour of the terminal - you can change it.
If you need to use a GUI on ADA (eg matlab, stata, gview) - you will need to open an interactive session and then type the command to open the GUI.
Basic commands
- Files are held within directories (also known as folders).
- You can have a hierachy of directories, and sub directories, starting with your home directory.
- Your home directory location (pathway) is referred to as ~/
- the address of a file or folder is called its pathway - eg ~/test-jobs/test1.sh
- if you don't like typing - you can use tab completion to fill in the rest of a unique name - type the first few letters and then press tab.
ls | List Directory Contents | Lists everything in the current directory. |
cd | Change Directory | Used to switch directories. |
pwd | Display pathname | Displays the current pathname. |
mv | Rename or move files | Moves/renames files or directories. |
cp | Copy files or directory | |
mkdir | Make Directory | Create a folder in your current directory. |
rm | Remove or delete files | |
rmdir | Remove or delete directories | |
history | shows you previous commands you have used | |
clear | Clear terminal window | Clears the complete window of your terminal. |
Working with files
- All files are plain text, or executable binaries.
- file names - they can be anything you like (but should not contain spaces).
- file name endings are used to help distinguish what is in the file. Common endings are:
- .txt - text
- .sh - shell script
- .sub - submission script
- .err - error file
- .out - output file
- .gz - zipped tar file (akin to a zip file)
- .jpg, .gif, .png - image files
- less - used to see the contents of a file
- editing files - you can use a command line app, or a gui. Details of editors on ADA.
- chmod - used to make a file executable - chmod u+x <filename>
Getting help with commands
To find out more about a command, and what options it has
- use help - help -m cp
- use man (manual pages - they can be a bit baffling) - man cp