Difference between revisions of "UNIX"

From PHASTA Wiki
Jump to: navigation, search
(Connecting (SSH))
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
Most of our systems (and general HPC resources) run some UNIX derivative. Much of the software is command line based, so it's worthwhile to learn the basics.  
 
Most of our systems (and general HPC resources) run some UNIX derivative. Much of the software is command line based, so it's worthwhile to learn the basics.  
  
There are tons of free resources on the web for getting started, for example this [http://learncodethehardway.org/cli/book book]. There should also be a "for dummies" book in the lab.  
+
There are tons of free resources on the web for getting started ([https://www.tipsandtricks-hq.com/basic-unix-commands-list-366#:~:text=File%2FDirectory%20operation%20related%20Unix%20Commands.%201%20cp%20%E2%80%93,which%20is%20the%20pathname%20of%20a%20directory.%20 Basic UNIX Commands]). There should also be a "for dummies" book in the lab.  
  
 
As you find resources that are helpful, please update this page.
 
As you find resources that are helpful, please update this page.
  
 
== Connecting (SSH) ==
 
== Connecting (SSH) ==
Windows:
+
Windows 8 and older:
 
[http://www.chiark.greenend.org.uk/~sgtatham/putty PuTTY SSH Client]
 
[http://www.chiark.greenend.org.uk/~sgtatham/putty PuTTY SSH Client]
 
[http://winscp.net/eng/index.php WinSCP file transfer tool]
 
[http://winscp.net/eng/index.php WinSCP file transfer tool]
  
MacOS and Linux users can use [http://openssh.org/ OpennSSH] on the command line (it generally comes with the OS).
+
MacOS and Linux users can use [http://openssh.org/ OpennSSH] on the command line (it generally comes with the OS). Windows 10 versions and newer will also have built in ssh capabilities.
  
 
=== Resources for setting up ssh keys ===
 
=== Resources for setting up ssh keys ===
Line 19: Line 19:
  
 
Script for automatically starting <code>ssh-agent</code> on login of a machine (place in your <code>.profile</code>/<code>.bash_profile</code>): [https://stackoverflow.com/a/18915067/7564988 StackOverflow: Start ssh-agent on login]
 
Script for automatically starting <code>ssh-agent</code> on login of a machine (place in your <code>.profile</code>/<code>.bash_profile</code>): [https://stackoverflow.com/a/18915067/7564988 StackOverflow: Start ssh-agent on login]
 +
 +
=== Visual guide to ssh tunnels (ie. port forwarding) ===
 +
 +
A good resource to understand port-forwarding, and more advanced uses of port-forwarding: [https://robotmoon.com/ssh-tunnels/ A visual guide to SSH tunnels]
  
 
== Command Line Basics ==
 
== Command Line Basics ==
  
[https://www.rc.colorado.edu/support/tutorials/linux Slides and Video from CU's Research Computing group]
+
[https://explainshell.com/# Explain Shell]: Copy/paste a CLI command, and it will tell you what all the flags mean
  
[http://www.nixsrv.com/llthw  "Learn Linux the Hard Way" (online book)]
+
[https://arstechnica.com/gadgets/2021/08/linux-bsd-command-line-101-using-awk-sed-and-grep-in-the-terminal/ How to ''think'' when using <code>grep</code>, <code>awk</code>, and <code>sed</code>]: Article going over the basic uses of <code>grep</code>, <code>awk</code>, and <code>sed</code> and how to think through their use cases.
  
[https://explainshell.com/# Explain Shell]: Copy/paste a CLI command, and it will tell you what it all the flags mean
+
[https://www.funtoo.org/Awk_by_Example,_Part_1 Learning Awk by Example]: Tutorials going over how to use awk, while actually using examples.
  
 
[https://www.tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide]
 
[https://www.tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide]

Latest revision as of 10:12, 21 September 2023

Most of our systems (and general HPC resources) run some UNIX derivative. Much of the software is command line based, so it's worthwhile to learn the basics.

There are tons of free resources on the web for getting started (Basic UNIX Commands). There should also be a "for dummies" book in the lab.

As you find resources that are helpful, please update this page.

Connecting (SSH)

Windows 8 and older: PuTTY SSH Client WinSCP file transfer tool

MacOS and Linux users can use OpennSSH on the command line (it generally comes with the OS). Windows 10 versions and newer will also have built in ssh capabilities.

Resources for setting up ssh keys

Visual guide to how ssh-keys and ssh-agent work: An Illustrated Guide to SSH Agent Forwarding

For setting up ssh-agent (so you don't have to type your password over and over): Understanding ssh-agent and ssh-add

Script for automatically starting ssh-agent on login of a machine (place in your .profile/.bash_profile): StackOverflow: Start ssh-agent on login

Visual guide to ssh tunnels (ie. port forwarding)

A good resource to understand port-forwarding, and more advanced uses of port-forwarding: A visual guide to SSH tunnels

Command Line Basics

Explain Shell: Copy/paste a CLI command, and it will tell you what all the flags mean

How to think when using grep, awk, and sed: Article going over the basic uses of grep, awk, and sed and how to think through their use cases.

Learning Awk by Example: Tutorials going over how to use awk, while actually using examples.

Advanced Bash-Scripting Guide

Graphical Sessions (VNC)

See VNC

File Permissions and ACL

See File Permissions Basics and ACL