Linux - System Setup: Difference between revisions

From Computer Science at Indiana State University
Jump to navigation Jump to search
Line 40: Line 40:


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.
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.
==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.
<pre>
sudo apt update  # makes sure APT has the latest information about packages available
sudo apt install emacs
sudo apt install kate
sudo apt install gftp
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
</pre>
''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, your advisor, 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==
==Chromebook==

Revision as of 22:13, 4 June 2026

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

Note - this page needs updating, was last updated in 2020.

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; see CS accounts.

Your Personal Computer

Terminal Program

A terminal program allows you to type commands to run programs and view files and folders on your computer, and allows you to do the same on a remote computer (i.e., the CS server) after you have connected to it.

Any current computer (Windows, Mac, Linux, Chrome) has a terminal program builtin. You just need to know how to start it. For each OS, here is what you need to do...

Note - the first time you connect to the CS server with a terminal or file transfer program, you will be notified that the identity of cs.indstate.edu cannot be verified, an ECDSA key will be displayed, and you will be asked if you still want to connect. Type or click yes.

  • Windows - use the command prompt or powershell. To use the command prompt, click the Start button (at the bottom of your screen, in the middle or the left normally), start typing either "command" or "cmd" and you should see the option to run "Cmd.exe" or "Command Prompt". To use the PowerShell, do the same (click the Start button) but start typing "Power Shell".
  • Mac OS - use the Terminal program. To use the built-in Terminal program, use Spotlight (hold down the command key and press spacebar) and type in "Terminal". You should see the Terminal program to click on. You can also start Terminal by clicking on the Apps icon in the Dock, and start typing "Terminal".
  • Linux - this depends on the distribution you are using. Some use the name "terminal" for this program, and some use the name "shell". For Ubuntu Linux with the default user interface (Gnome), you can click on the button in the bottom left (or press the Start key on your keyboard) and then start typing "Terminal" or "Shell". You can also directly open the terminal by holding down the control-alt-t keys.
  • Chrome - you need to first need to enable the "Linux development environment". Click on the G or Chrome button (in the bottom left), click on Settings, in the settings click on "About ChromeOS" on the bottom, and find the "Developers" section, then click on "Set up" for the Linux development environment, then click through the setup process (you can leave default values for everything). Once you have this complete, you can start the terminal by clicking on the G or Chrome button (in the bottom left), start typing "Terminal" and click on it. You will see a Linux section and click on the first entry to start the terminal.

File Transfer Program

You will eventually need to transfer files between your personal computer and the CS server.

  • All current OSes include a text-based file transfer program as part of the terminal (see above for starting a terminal). Once you have a terminal open, you use the command "sftp" to start the secure ftp program.
  • FileZilla is a graphical file transfer program that can be installed on any current OS.

Note - the first time you connect to the CS server with a terminal or file transfer program, you may be notified that the identity of cs.indstate.edu cannot be verified, an ECDSA key will be displayed, and you will be asked if you still want to connect. Type or click yes.

Note - make sure to choose "sftp" as opposed to "ftp" when connecting. ftp is not encrypted and is disabled on the CS server (it will not work). sftp is encrypted and is what we use.

Text Editor

Note that while you are using a terminal that is connected to the CS server you can use text-based editors - nano, emacs, vim, jove (see Linux Terminal - Text Editors for more on how to get started with these). You will eventually want to have a good text editor on your personal computer.

The following are four good options that are cross-platform - can be installed on Mac, Windows, Linux, and Chromebook. If you already use some other option (e.g., Visual Studio Code, Eclipse, Notepad++, or anything else that is used by programmers) feel free to keep using what you are already using. Note that Word is not a text editor - it does not store files in plain text, which is what is needed for programming.

  • VS Code - one of the most popular (as of 2026) with a lot of available add-ons.
  • Vim - is normally already installed by default on Linux. Follow the instructions if on a different OS.
  • Emacs - used by Jeff Kinne, click your OS and follow the instructions. The graphical version uses all the same keyboard shortcuts as the text-based version that you can also use in the terminal. Note that for Chrome OS, you will first start a Terminal (see above) and then run the command sudo apt-get install emacs and answer Y when it asks if you want to install it.
  • Other cross-platform editors that students and faculty have used - Kate,Submlime
  • You might also choose to use an Integrated Development Environment (IDE). Those have a bit of a learning curve, but if you have used one before you can use it for CS coursework as well.

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.

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 (those mentioned above).

For the text-based sftp programs, the basic commands you will need.

  • ls, cd, pwd - show you the files on the server and change directories on the server.
  • lls, lcd, lpwd - show you the files on your computer and change directories on your computer.
  • put - send a file from your computer to the server (from your current directory on your computer, to the current directory on the server).
  • get - download a file from the server to your computer
  • quit

Compilers/Interpreters

Python

C/C++

Backing up Files - Rsync

GUI Programs X-Windows

To run a GUI program while connected to the server, you will need to be running an X11 client on your local computer and have it running when connect to the server. Some further details depending on your operating system.

Once you have your X11 client installed, open it, and then connect to the CS server using the -Y switch in your ssh command:

ssh -Y username@cs.indstate.edu

To verify everything is working try running in your terminal xcalc:

xcalc

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.