Written by Chris Gregg, Julie Zelenski and others, with modifications by Nick Troccoli and Lisa Yan
Mac
Click here for a walkthrough video.
All Macs have a built-in Terminal program, since like Myth machines they are also built on top of Unix. You can find the Terminal program by searching for it via the magnifying-glass in the top-right corner of your desktop, or by opening the Applications
folder and going into Utilities
.
When you open Terminal, initially you'll be seeing the files and programs of your own computer, just through the lens of Terminal instead of Finder.
We'll need to configure one setting (a one-time change) before logging in to myth: in the top menu bar, click Terminal -> Preferences -> Profiles -> Keyboard -> "Use Option as Meta Key". This means the "Option" key on your keyboard will act as the "Meta" key for Emacs, instead of the Escape key. You'll learn more about Emacs later.
Note - when you open terminal for the first time, you may see the following message:
The default interactive shell is now zsh. To update your account to use zsh, please run
chsh -s /bin/zsh
. For more details, please visit https://support.apple.com/kb/HT208050.
This is asking whether you'd like to update the version of your shell on your Mac. Either way, this will not impact anything about logging into myth - but you can update if you'd like by running the specified command.
Now that you're all configured, use the ssh
command to connect to the myth
machines. Just be sure to keep track in your own mind of whether you're on myth or your own computer at any given moment! The command you want to type is:
ssh [sunet]@myth.stanford.edu
where [sunet] is your SUNet ID (i.e., the name part of your stanford email address, so if your SUNet ID is troccoli, you would type ssh troccoli@myth.stanford.edu
). It will ask for your password, which is your usual Stanford password. If it asks you to confirm that you would like to access myth
, type "yes". And now you're logged into myth!
Windows
Windows OS does not natively support the development tools used in this course. Enabling WSL (Windows Subsystem for Linux) allows you to run an Ubuntu instance on top of Windows OS. You will install the necessary development tools into the Ubuntu WSL environment and do your coursework there.
Enable WSL Windows feature
- Type "features" into the start bar and open the Control panel to "Turn Windows features on or off".
- In the panel, find the checkbox "Windows Subsystem for Linux", "Virtual Machine Platform", and "Windows Hypervisor Platform". Check the box, and click "OK".
- Wait for it to complete the requested changes and then restart your computer when prompted.
Install Ubuntu 20.04 LTS
Ubuntu version 20.04 LTS for WSL is available in the Microsoft Store.
- Open the Microsoft Store app. Search for "Ubuntu 20", select
Ubuntu 20.04 LTS
and install it. Be sure to choose version Ubuntu 20.04 LTS. The other Ubuntu versions do not support the software requirements we need. - Once it's done, launch the application, and a terminal window should open. Depending on your system, you may see a message prompting you to take further setup steps at a given support link. Make sure to follow those steps. After that, it should display the message "Installing, this may take a few minutes..."
- Once that command finishes, it will prompt you to enter a new username and password for your local Ubuntu account. Be sure to remember this username/password; you'll need them later for admnistrator privileges.
-
Apply the latest Ubuntu updates by running the command below in the terminal window:
$ sudo apt update && sudo apt upgrade
Don't be alarmed about the long-winded Unix-babble---these processes are total chatterboxes.
-
Check: Confirm Ubuntu version by typing
lsb_release -a
: you should see something like the following:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
- You now have an up-to-date version of Ubuntu running on top of your Windows OS.
Now, you need to make a settings adjustment to the copy/paste behavior and to the screen buffer size (allows you to scroll back further in your window history, it will make your life much easier later):
- Right click orange Ubuntu logo in the top-right corner of the Ubuntu window.
- Click on properties.
- Click on the layout tab, and adjust "Screen Buffer Size Height" to a large value (e.g. 9000).
- Click on the options tab, and check the box "Use Ctl+Shift+C/V as Copy/Paste" (this will enable that keyboard shortcut to let you copy/paste to/from your Windows computer and the terminal)
- Click "OK" to save the preferences.
- This preferences window is also where you can go to change things like the font size if you'd like.
After this point, close the program and then start it again. Initially you'll be seeing the files and programs of your own computer, just through the lens of Terminal instead of Windows Explorer. From there, use the ssh
command to connect to the myth
machines. Just be sure to keep track in your own mind of whether you're on myth or your own computer at any given moment! The command you want to type is:
ssh [sunet]@myth.stanford.edu
where [sunet] is your SUNet ID (i.e., the name part of your stanford email address, so if your SUNet ID is troccoli, you would type ssh troccoli@myth.stanford.edu
). It will ask for your password, which is your usual Stanford password. If it asks you to confirm that you would like to access myth
, type "yes". And now you're logged into myth!
Older Windows Versions
PuTTY
Older Windows versions (prior to April 2018) do not have a Windows PowerShell program that supports ssh
functionality, but there is a program called PuTTY that provides ssh
functionality instead.
Putty is available here - download the package file, or scroll down to the "Alternative Binary Files" section for files that don't need to be installed (for example, if it is not your computer and you don't have permission to install software). Use the 64-bit version (or 32-bit if your computer is more than about 5 years old).
Here's how to use it to connect to Myth:
- In the Host Name field, type "myth.stanford.edu".
- Leave everything else as-is, and click "Open" at the bottom of the window to connect.
- If a security alert appears about a host key, click "Yes".
- When the program prompts you with "login as:", enter your SUNET ID (e.g. part before @stanford.edu).
- When the program prompts you with "password", enter your Stanford password.
SecureCRT
If you are unable to install PuTTY for some reason, there is a program called SecureCRT that provides ssh
functionality instead.
Note that SecureCRT is not as compatible with Emacs mouse commands as the above two options.
Download and install the SecureCRT software program that will run ssh
for you. It is available as a free download from Stanford. Of the two download options at that link (32-bit and 64-bit), choose 64-bit unless your computer is more than about 5 years old.
After the program is installed, launch it.
We'll need to configure some Emacs settings (a one-time change) before logging in to myth.
- In the top menu bar, click Options->Edit Default Session
- Select "Emacs" as the category, under Terminal->Emulation
- Check the box "Use ALT as meta key". This means the "Alt" key on your keyboard will act as the "Meta" key for Emacs, instead of being used to access shortcuts within SecureCRT. Take a look at our Emacs guide for more information about Emacs.
- Click OK to save the changes.
- When it asks you whether you would like to apply this to all sessions, select that you'd just like to change the Default Session.
A general setting to configure:
- In the top menu bar, click Options->Edit Default Session
- On the "Terminal/Emulation" page, set the emulation to "Xterm"
- Make sure the value of the "Terminal type" option in the "Terminal / Emulation / Advanced" category is NOT enabled.
- Click OK to save the changes.
- If it asks you whether you would like to apply this to all sessions, select that you'd just like to change the Default Session.
Now we can connect to Myth:
- Go to File -> Quick Connect.
- Enter Hostname "myth.stanford.edu".
- For Username, enter your SUNet ID (i.e., the name part of your stanford email address).
- Leave everything else as-is, and click Connect.
- If it asks you about a New Host Key, click "Accept & Save".
- At the password prompt, enter your Stanford password.
Now you should be logged into Myth! Note that you didn't need to actually type the ssh
command, as the program is your ssh
client and did this for you. Also, you'll only need to do the above steps once; when you launch SecureCRT in the future, myth will now be listed underneath the available Sessions in the program sidebar for you to double-click on. (If you don't see this sidebar, click the toolbar icon in the top-left corner of the window that looks like a file tree).
Linux
Click here for a walkthrough video.
All Linux machines have a built-in Terminal program, since like Myth machines they are also built on top of Unix. You can find the Terminal program by searching for it using the search functionality of your chosen Linux version. For instance, Ubuntu users can follow the instructions in this WikiHow guide.
When you open Terminal, initially you'll be seeing the files and programs of your own computer, just through the lens of Terminal instead of your graphical filesystem. From there, use the ssh
command to connect to the myth
machines. Just be sure to keep track in your own mind of whether you're on myth or your own computer at any given moment! The command you want to type is:
ssh [sunet]@myth.stanford.edu
where [sunet] is your SUNet ID (i.e., the name part of your stanford email address, so if your SUNet ID is troccoli, you would type ssh troccoli@myth.stanford.edu
). It will ask for your password, which is your usual Stanford password. If it asks you to confirm that you would like to access myth
, type "yes". And now you're logged into myth!
Troubleshooting
My Windows 10 computer is in a different language without alphanumerical characters, such as Chinese, and I'm having trouble with the instructions.
Ubuntu (the software that is installed in the instructions) may not be able to recognize your user folder name to properly install. If possible, one solution is to change your computer's display language to English, which entails making a new admin account, unsyncing the language, and changing the display language, such that everything is in English. However, this might not be possible in the Home Edition of Windows 10. If for this or other reasons you are not able to or would not like to change the language, we advise that you instead follow the instructions on this page to install the SecureCRT program. [Thanks to TA Annie S.]
More Information
- For more information about SUNET IDs, click here
- For more information about AFS, click here
- For more information about the myth cluster, click here. You will need to be a declared CS student to access this page, as the myth cluster is managed by the CS department and intended for general use by CS department students.
- For more information about the Stanford Farmshare environment, the larger group of systems you can access (and of which
myth
is a subgroup), click here. - Optionally, you can configure Xwindows to enable graphical windows.