1Operating Systems and Using LinuxTopics What is an Operating System? Linux Overview Frequently Used Linux CommandsReadingNone.What is an Operating System(OS)? A computer program Performs many operations, such as: Allows you to communicate with thecomputer (tell it what to do) Controls access (login) to the computer Keeps track of all processes currentlyrunning At this point, your main concern is howto communicate with the computerusing the OSHow Do I Communicate With theComputer Using the OS?• You communicate using the particular OS’s user interface.• Graphical User Interface (GUI) - Windows• Command-driven interface - DOS, UNIX, Linux• We will be using the Linux operating system, which is very similar to UNIX.2How Do I Communicate With theComputer Using the OS? (cont.) When you log in to the Linux system here, a user prompt will bedisplayed: linux#[1]% _ where # is the number of the Linux server that you have connected to.You may use any of the Linux servers. The number in the brackets will change as you work. It is the“number” of the command that you are about to type. If this prompt is not on the screen at any time, you are notcommunicating with the OS.Linux Overview Files and Filenames Directories and Subdirectories Frequently Used CommandsFiles A file is a sequence of bytes. It can be created by a text editor (xemacs or pico) a computer program (such as a C program) It may contain a program, data, adocument, or other information . Files that contain other files are calleddirectories (sometimes called folders).3Linux Filenames Restrictions May not contain blanks or other reserved characters Have a maximum length Are case sensitive It is best to stick with filenames that containletters (uppercase or lowercase), numbers, andthe underscore ( _ ) for now. Project_1.cDirectories Directories contain files or other directories calledsubdirectories. They may also be empty. Directories are organized in a hierarchical fashion. They help us to keep our files organized.Directories (cont.)junkrecipes notescookiespies CMSC104apple peachchoc_chip/afs/umbc.edu/users/j/d/jdoe284Directories (cont.) Your home directory is where you are locatedwhen you log in /afs/umbc.edu/users/j/d/jdoe28 The current directory is where you arelocated at any time while you are using thesystem. Files within the same directory must be givenunique names. Paths allow us to give the same name todifferent files located in different directories. Each running program has a current directoryand all filenames are implicitly assumed to startwith the name of that directory unless theybegin with a slash.Subdirectories Are used for organizing your files For example, make a subdirectory for CMSC104 make subdirectories for each projectCMSC104Project_1Project_2Project_3Project_4Moving in the Directory Tree . (dot) is the current directory. . . (dot-dot) is the parent directory. Use the Linux command cd to change directories. Use dot-dot to move up the tree. Use the directory name to move down. Use the complete directory name (path name) tomove anywhere.5Frequently Used Linux Commands passwd, man, lpr pwd, ls, cat, more, cd, cp, mv, rm mkdir, rmdir ctl-cReferences: Linux man page Links from the 104 homepage Books and the InternetWildcard Characters You will find wildcard characters useful whenmanipulating files (e.g., listing or moving them). The wildcard characters are * and ? ? is used to represent any single character. * is used to represent 0 or more
View Full Document