Difference between revisions of "Linux - System Setup"

From Computer Science
Jump to: navigation, search
(System Setup HW)
(Cross-Platform - File Transfer and Text Editor)
Line 19: Line 19:
 
==Cross-Platform - File Transfer and Text Editor==
 
==Cross-Platform - File Transfer and Text Editor==
 
Choose a file transfer program and a text editor to install.  For each, on Windows and Mac you will download the installer to install the program.  If you are using Linux or Chromebook, see the sections below about these environments.
 
Choose a file transfer program and a text editor to install.  For each, on Windows and Mac you will download the installer to install the program.  If you are using Linux or Chromebook, see the sections below about these environments.
* '''File Transfer Program''' - [https://filezilla-project.org/download.php FileZilla] - ''If given an option of what port to connect to, use port 22 (this is the "secure" port, so data is encrypted while transferring over the public internet).  Another option that is good but only available on Windows is [https://winscp.net/eng/download.php WinSCP]''.
+
* '''File Transfer Program''' - [https://en.wikipedia.org/wiki/Cyberduck CyberDuck] for MacOS or Windows, [https://winscp.net/eng/download.php WinSCP] is another good option for Windows, [https://www.gftp.org/ gFTP] is a good option for Linux
 
* '''Text Editor''' - [https://kate-editor.org/get-it/ Kate] [https://atom.io/ Atom] [https://www.gnu.org/software/emacs/ Emacs] [https://www.vim.org/download.php Vim] - all are good editors for programming that are available on Windows, Mac, and Linux.  You can ask your instructors which they prefer (and can help you with), or pick one and stick with it.  When starting a new text editor do an internet search for a tutorial to get you started; once you are comfortable with the basics do an internet search for a cheat sheet of keyboard shortcuts to help you remember them.
 
* '''Text Editor''' - [https://kate-editor.org/get-it/ Kate] [https://atom.io/ Atom] [https://www.gnu.org/software/emacs/ Emacs] [https://www.vim.org/download.php Vim] - all are good editors for programming that are available on Windows, Mac, and Linux.  You can ask your instructors which they prefer (and can help you with), or pick one and stick with it.  When starting a new text editor do an internet search for a tutorial to get you started; once you are comfortable with the basics do an internet search for a cheat sheet of keyboard shortcuts to help you remember them.
  

Revision as of 05:37, 14 January 2020

This page is meant to help you get your computer ready to connect to the CS server.

This page is a part of the Linux and CS Systems - Getting Started.

Video demo, one per OS, coming soon.

Note - for additional software and configuration beyond that listed on this page see Linux - System Setup 2.

CS User Accounts

Below we guide you through getting software setup on your computer. In order to connect to the CS server you will also need your CS user account. CS accounts are normally distributed during the first week of classes. If you are a CS major, you can also request a permanent CS account. See CS Accounts and CS Lab Computers.

Your Personal Computer

You need to have access to a computer that you can install the following on - (a) terminal program used to connect to the CS server and execute commands on the CS server, (b) file transfer program for transferring files between your computer and the CS server, (c) text editor to use on your computer.

There are good options for (b) and (c) that are cross-platform - are available and work the same on Windows, Mac, and Linux.

Chromebook - if you are using a chromebook see below, there are different options than on Windows, Mac, and Linux.

Cross-Platform - File Transfer and Text Editor

Choose a file transfer program and a text editor to install. For each, on Windows and Mac you will download the installer to install the program. If you are using Linux or Chromebook, see the sections below about these environments.

  • File Transfer Program - CyberDuck for MacOS or Windows, WinSCP is another good option for Windows, gFTP is a good option for Linux
  • Text Editor - Kate Atom Emacs Vim - all are good editors for programming that are available on Windows, Mac, and Linux. You can ask your instructors which they prefer (and can help you with), or pick one and stick with it. When starting a new text editor do an internet search for a tutorial to get you started; once you are comfortable with the basics do an internet search for a cheat sheet of keyboard shortcuts to help you remember them.

Terminal Program

If you are using MacOS or Linux you already have a terminal program installed. You don't need to install anything, you just need to follow some steps to use the terminal program that is already installed. For Windows, you need to install a terminal program.

  • On Mac OS - Built-in Terminal - Use the built-in Terminal program in Mac OS to connect to the cs server, and you can also use the Terminal program to run commands on your local computer. You open the terminal by opening Finder, then click on Applications, then click on Utilities, then open Terminal. When you get the terminal program open, you can login remotely to the CS server by typing "ssh username@cs.indstate.edu".
  • On Linux - Built-in Terminal - Similar to MacOS, a terminal program is already built-in. How to get to the terminal program (also called the "shell") depends on which distribution you are running - ask the internet where to find the terminal program for your distribution. When you get the terminal program open, you can login remotely to the CS server by typing "ssh username@cs.indstate.edu".
  • On Windows - Install - Putty - download Installing Putty on Windows
  • On Chromebook - Install - Secure Shell - Download Chrome Extension configuration

Installing for Linux

Most Linux distributions have their own package management systems, with the programs mentioned on this page being installable via the package management system. There often is a graphical interface to the package management system, and there is normally a text-based interface - you type commands on the terminal to install packages.

Debian, Ubuntu, and related Linux distributions use the APT package manager, and you can install the programs mentioned on this page by entering the following commands in the terminal. Note that you will likely be asked in the terminal whether you want to install the package, you need to type Y and press enter.

sudo apt update  # makes sure APT has the latest information about packages available
sudo apt install emacs
sudo apt install kate
sudo apt install filezilla
sudo apt install vim
# Note - installing atom requires adding the repository where atom is kept
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt update
sudo apt install atom

Other Linux distributions use different package managers. If you use a different Linux distribution and are unable to figure out how to install packages you can ask your instructor, the associate chairperson for CS, or the CS system administrator.

After installing the above programs you can open them from the terminal (i.e., to open filezilla you type the command, filezilla). The programs may also appear in the graphical menu of programs.

Chromebook

On Chromebook you can choose whether to install apps and do all of your work connected to the CS server, or install Linux on your Chromebook and then use the instructions above on installing the programs.

Using apps - Install the following apps.

  • Text Editor - Text
  • Terminal Program - Secure Shell
  • File Transfer Program - use the builtin Files app along with the Secure Shell app, configure as follows.
    • Open the Files app.
    • Click on the triple-dots in the upper right of the Files app, click Add new service, click Secure Shell App.
    • On the Secure Shell App screen that comes up, enter your login information with cs.indstate.edu as the server and 22 as the port. Then click SFTP Mount.
    • Go back to the Files app and you will see LOGIN@cs.indstate.edu:22 as an option on the left.

Linux (Beta) on Chromebook

  • Not all chromebooks allow installation of Linux (Beta). If this works then you will have Linux installed on your Chromebook and will be able to use any of the commands that you use on the CS server.
  • Follow instructions from google.
  • Note - installation could take a very long time (e.g., an hour or more). If installation fails you may need to select Remove Linux Beta and try again.
  • Once installation is complete you open a terminal using the Terminal app. To install the programs mentioned on this page follow the instructions above for Linux (using the APT package manager commands).
  • After the programs are installed you can open them by typing the command in the Terminal or by opening them as apps.

Copy/paste - in either the Secure Shell app or the Terminal app, copy/paste as follows. To copy, simply select text with the mouse and it will be copied to the clipboard. To paste, do a triple-click (three finger click).

Other OS-Specific Notes

If you are using Windows and have Putty installed as your terminal program, it installs a text-based file transfer program as well - psftp - which you should be able to find in your list of programs.

If you are using MacOS or Linux, a text-based file transfer program - sftp - is normally installed by default.

In either case, new users often prefer to use graphical file transfer programs (i.e., FileZilla).

ISU CS Lab Computers

The computers in ISU CS labs (Root Hall A-015, A-017, A-019) are already configured with Linux. You can use these computers as long as you have a CS account.

Sample HW

The following might be used by your instructor as part of a HW assignment to verify you have your computer setup properly.

  1. Follow the steps above to setup your computer with a file transfer program, text editor, and terminal program. Make sure you are able to use the file transfer program and terminal programs to connect to your CS class account on the CS server.
  2. Make sure you can open the text editor. Create a text file aboutMySystem.txt and put the following information.
    1. Your name:
    2. Your CS class account:
    3. Operating System:
    4. Text editor you are using:
    5. File transfer program:
    6. Did you have any difficulties in getting the programs setup? If yes, explain.
  3. Create the following screen shots demonstrating that you have the programs installed on your system properly. Note - you can ask the internet how to take a screenshot (e.g., type in - how to screenshot on chromebook). For each screenshot, make the screenshot of your whole screen (so I can see which OS you are running on and the program open and connected).
    1. textEditor.jpg - a screenshot that shows you editing the aboutMySystem.txt file with your text editor.
    2. fileTransfer.jpg - a screenshot that shows you using the file transfer program to connect to the CS server with your CS class account.
    3. terminal.jpg - a screenshot that shows you with the terminal program open and connected to the CS server with your CS class account.
  4. Use the file transfer program to connect to the CS server with your CS class account.
    1. While connected, create a new directory in your CS class account on the CS server. Name the new directory SystemSetup.
    2. Transfer the files you just created (aboutMySystem.txt, textEditor.jpg, fileTransfer.jpg, terminal.jpg) into the SystemSetup directory in your CS class account on the server.