Learn Linux without Linux
Q: How can I learn Linux before accessing the cluster if I don't have a Linux machine? A: There are several options discussed below including the macOS Terminal, Windows Unix emulators, and reserving a Virtual Linux Machine with NCSU's Virtual Computing Lab (VCL).
macOS
To learn Linux commands on a Mac, use the Terminal.
Open the Terminal by opening the Applications folder, then the Utilities folder, and then click Terminal.app.
Alternatively, use the Mac 'Spotlight Search' tool (hit [Command+Space] or click the magnifying glass in the tool bar) and search for Terminal.
Windows
-
To learn Linux commands on a Windows machine, use a Unix emulator.
MobaXterm
Download and install the MobaXterm Home Edition.
Open MobaXterm and click Start local terminal.
To install additional commands, use apt-get install, e.g.:
apt-get install nano
Windows Subsystem for Linux (Windows 10)
Here are some links to instructions for the Windows Subsystem for Linux.Linux (VCL)
If using the VCL, several versions of Linux distributions are available. Hazel uses CentOS and the LinkedIn Learning tutorial uses Ubuntu 18.
Go to the VCL website and click the Make a Reservation button. Enter credentials, click the Reservations tab, and then click the New Reservation button. Choose Basic Reservation, choose CentOS 7 base from the dropdown menu, increase the duration of the reservation, and click Create Reservation.
After the reservation finishes the pending state, click Connect!. Do not close the resulting window until after copying/saving the number for the Remote Computer.
Log in to this remote computer with SSH in the same manner as described in the instructions for logging in to the HPC, but replace login.hpc.ncsu.edu with the number for the Remote Computer.
To have a GUI interface on the VCL Linux instance, choose a VCL Ubuntu 18 base image, open the RDP file, then right click on the virtual desktop to open a terminal.
What you can (and cannot) do on 'not Linux'
Basic commands - yes.- All of the above described methods of emulating a Linux operating system will be sufficient for learning enough basic Linux to run on Hazel. Some commands may not be automatically available and require installation (e.g., git or nano).
- Some commands are based on the shell. Since Hazel's default shell is currently bash, tcsh is used in the Full Linux Tutorial, but bash is used for the LinkedIn Learning tutorials and the Software Carpentry tutorial. The default shells for both macOS and Windows emulators are bash. Basic commands are independent of shell, but in the more advanced sections of the tutorials, check the shell and change it if possible and necessary.
- What you cannot do is compile a code on a Linux emulator and then run it on Linux machine. In fact, you can't compile on one flavor of Linux and run it on another, and in general you usually compile code on the same machine you will run it on. (Some container technology is the exception, and Hazel does not currently support running containers.)