Instructions, tutorials, FAQs and settings files for Linux
Last updated 2020-10-06 by Adam Lu
Where do I start?
- Connect to the server via these instructions (also contains instructions on opening applications such as MATLAB, ImageJ, RStudio, Jupyter Notebook or Spyder).
- Go through the first two of these Tutorials to learn how to use the command line and the vim or the nano editor.
- Check out other common built-in commands in the file Common Unix Commands (use CTRL + Fto search for a keyword).
- Check out the custom aliases and the custom commands and scripts that already available.
- To add an alias: See these instructions
- To change file permissions: See these instructions
- To write commands (functions): Edit from the template provided at the end of the file adams_commands.sh, using Shell Script Syntax Notes as a reference.
- To write scripts: Use the custom script create_new_script.shto create a new script from the Shell Script Template, using Shell Script Syntax Notes as a reference.
- To run code on Rivanna: Go through the resources in /media/adamX/Rivannaon fishfish. Then create your own SLURM script from the SLURM Script Template, using SLURM Script Syntax Notes as a reference.
- To add a new user to the server: See these instructions.
- If the server IP is changed: Apply these instructions to update the server IP in the cron job bash scripts.
What do I have to do after the server is rebooted?
- (For fishfish only) Please open a terminal on the server via these instructions, then type in the following two commands:
    # Custom script for mounting all drives mount_all_disks.sh # Custom script for setting up inotifywaits watch_all_readmes.sh
Useful links
- See instructions here for how to access these links on the server.
- Tutorials
- Frequently Asked Questions
- Troubleshooting
Useful notes and templates
- Common Unix Commands: Contains common Unix commands used in the command line
- Linux notes: Contains terminology and acronyms for the Linux system
- Shell Script Syntax: Contains syntax, usage and common variables for shell scripting
- SLURM Script Syntax: Contains syntax and system variables for SLURM scripting
- Shell Script Template: A template for a shell script (see create_new_script.sh for how to use this on the servers)
- SLURM Script Template: A template for a SLURM script
- Note: I’ve created aliases that everyone can use on the command line to quickly access or edit the above files:
    - To access the files with less: less_commands,less_Linux_notes,less_sh_syntax,less_SLURM_syntax
- To edit the files with vim: vi_commands,vi_Linux_notes,vi_sh_syntax,vi_SLURM_syntax
 
- To access the files with less: 
- A helpful vi/vim cheat sheet:
 
- Upgrade/Installation notes
Custom Bash Scripts
User accounts
Firewalls
States and Settings
- backup_states: Outputs and Errors of cron jobs
- backup_settings: Backed up copies of /etcand/procfiles on the servers- backup_settings/backup_var_spool_cron_fishfish: Backed up user-defined cron jobs on fishfish
- backup_settings/backup_var_spool_cron_chalkboard: Backed up user-defined cron jobs on chalkboard
 
Sample folders
- sample_desktopfiles: Useful .desktopfiles. These are copied to/usr/share/applications.
- sample_icons: Icons used in the .desktopfiles. These are copied to/usr/share/icons.
- sample_dotfiles: Stored versions of user configuration files such as ~/.bashrc,~/.bash_aliases,~/.vimrc,~/.profileetc.
How can I update these files on the server?
- 
    Method 1: Update them directly from the locations: - /media/adamX/Settings_Linuxor- ~/Settings_Linux(fishfish)
- /home/adam/Settings_Linux(chalkboard)
 
- 
    Method 2: Edit them here on GitHub then apply the following commands on the server: 
cd ~/Settings_Linux
git_update
bash scripts/setup_binfiles.sh