CSCE 2004 - Laboratory Assignment 1

The objective of this laboratory assignment is to introduce students to the Linux operating system, the C++ compiler, and the programming environment we will be using this semester. CSCE students must have a valid University of Arkansas account to perform this lab. Use the UARK username and your UARK password that you use to access your UARK email to login to the system.

  1. Introduction to the Linux Working Environment

    The Linux environment is different than the Windows environment. Linux is free, more flexible, and we can virtually do anything using a Linux environment. In this course we are going to use the command prompt of Linux (AKA Shell) in order to access the CSCE server, Turing, where all of our programs and files will be stored throughout the semester. To open a shell window, go to Systems and then select the shell program.

  2. Introduction to the Netbeans IDE
  3. Now that we've briefly explored the CSCE server Turing, the Linux command line environment, and the nano text editor, we will take the same ideas over to our primary programming environment for the semester, Netbeans.

  • Submit Work

    To submit your lab work, have your TA check over any code/output that you've done during this lab session and record that you completed the lab assignment.

    Important Note: It is your responsibility, not the TA's, to ensure that your lab is recorded as being completed before you leave! Although the labs are intended to be completed in the alloted lab time, if you need additional time to finish the lab assignment, you have 24 hours from the end of the lab meeting time to finish. If so, you should ask your TA for instructions on how to submit the lab assignment after the lab ends.

  • Logout of the System

    After making sure that you submitted the code correctly and you have done the entire assignment, logout of the system by clicking on the blue K button in thelower left hand side of the screen. Then, click on Log Off. Wait a few seconds for a window to pop up and then click Log Off.

  • Basic Linux Commands Reference

  • cd (Change Directory): This command will allow the user to access a specific directory. E.g. cd 2004 will allow the user to move into subdirectory called 2004 (if it exists) from directory they are in; cd on its own will move you back to your home directory.
  • cd .. : Move to the parent directory of the current directory.
  • mkdir (Make Directory): This command will allow the user to create a new directory. E.g. mkdir test will create the test directory.
  • nano <filename>: This command will edit the filename (or create a new file by that name).
  • g++ file.cpp -o file.exe This command will compile file.cpp and create file.exe.
  • ls (List files): This command will list the contents of the current directory. You can add -l or -lt to see file details and sort with most recent first.
  • mv (Move files): This command will move a file, a collection of files, or a directory from one location to another.
  • cp (Copy files): This command will copy a file without affecting the original copy.
  • rm (Remove files): This command will delete a file.
  • more: (Display files) This command is used to print the contents of a file to the screen, one screen at a time.
  • rm: (Remove files) This command is used to delete a file. Be careful when using this command.
  • rmdir: (Remove directories) This command is used to delete a directory. Be careful when using this command.
  • htop: This command will show you the processes that are currently working. It is equivalent to using control, alt, and delete in windows.
  • man (manual): This command will give a description of any keyword you can use in Linux. E.g. man cd will give you a description of the command cd and how to use it.