Linux Commands and GNU compiler Guide The following are some simple commands that you might need to use while working on the linux server: Making a connection. Do to security reasons, we are now using a secure shell for login. Also, you will need download and configure the CISCO AnyConnect from NC A&T's website https://vpn.ncat.edu/ If you are off campus and want to connect to euler. Two documents on how to install and connect through the VPN can be found at this link. http://carrcomputing.asuscomm.com/:6310/carr/comp450/notes/ File names are: vpn_win.pdf for windows and vpn_mac.pdf for mac. After sucessfully connecting to the linux server, you might find the following linux commands useful. 1. passwd This command is used for allowing the user to change his password. All passwords on the linux box must satisfy the following conditions: a) Passwords must have a length of at least six. b) Passwords must contain both alphanumeric and numerical characters. c) Passwords can not be dictionary recognizable words. Suggestions for creating passwords: Use a combination of your Mother and Father's first name along with the last for digits of your phone number, license number, or telephone number. example: Suppose my Father's first name is David and my Mother's first name is Ann, then I might consider using this as a password davnind1234 2. cd This command allows you to move around the linux file system. "cd" stands for change directory. See the manual pages for more on this. 3. man This command is how you access the manual. The manual is a breif description of all linux commands. 4. ls This command allows you to list all the files in your current directory. For more on this command again see the online manual. 5. mkdir This command allows you to make directories. You will need to make directories for each of the chapters that we cover. 6. pwd This command displays your current directory path. 7. cat This command displays the contents of a file. 8. g++ This is the c++ compiler that we will be using. If compilation is successful, then an executeable file is written to the current directory called a.out. For Java the compiler command would be javac 9. Running programs. To execute a program you will need to do the following: (C++ execution) From the prompt [username@redux1 username]$ type ./a.out (Java execution) From the prompt [username@redux1 username]$ java filename < parameter list > 10. Editors A wide variety of text editors are available for you to use: nano vi vim 11. Copy To copy files from one directory to another cp example: cp /student/public/stack.cpp ~/chp3 This copies the file "stack.cpp" from the public directory to the user's home subdirectory chp3 12. Deleting Files: rm removes file from directory 13. Removing Directories The directory must be empty. rmdir