This page should serve as a reference for the many "things Linux" we use in this course. It is by no means complete – Linux is **huge** – but offers introductions to many important topics.
...
- Macs and Linux have a Terminal program built-in
- Windows options:
- Windows 10+
- Command Prompt and PowerShell programs have ssh and scp (may require latest Windows updates)
- Start menu → Search for Command
- Putty – http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
- simple Terminal and file copy programs
- download either the Putty installer or just putty.exe (Terminal) and pscp.exe (secure copy client)
- Windows Subsystem for Linux – Windows 10 Professional includes a Ubuntu-like bash shells
- See https://docs.microsoft.com/en-us/windows/wsl/install-win10
- We recommend the Ubuntu Linux distribution, but any Linux distribution will have an SSH client
- Command Prompt and PowerShell programs have ssh and scp (may require latest Windows updates)
- Windows 10+
Use ssh (secure shell) to login to a remote computers.
Code Block | ||||
---|---|---|---|---|
| ||||
# General form: ssh <user_name>@<full_host_name> # For example ssh abattenh@ls6.tacc.utexas.edu |
...
- Start the text with a single quote or a double quote
- press Enter when you want to start a new line
- keep entering text and Enter until you're satisfied
- supply the matching single quote or a double quote then Enter
example:
Code Block |
---|
echo 'My
name is
Anna' |
- Use echo -e
- The -e option tells echo to replace some special backslash escapes characters that represent non-printable characters with their associated ASCII codes
- So \n will be replaced by a newline (linefeed) character and \t will be replaced by a Tab.
example:
- The -e option tells echo to replace some special backslash escapes characters that represent non-printable characters with their associated ASCII codes
Code Block |
---|
echo -e "My\nname is\nAnna" |
heredoc
Another method for writing multi-line text that can be useful for composing a large block of text in a script, is the heredoc syntax, where a block of text is specified between two user-supplied block delimiters, and that text block is sent to a command. The general form of a heredoc is:
...