Introduction to Command Line Linux

Size: px
Start display at page:

Download "Introduction to Command Line Linux"

Transcription

1 Eric Nodwell Copyright 2003 Eric Nodwell This document can be freely redistributed according to the terms of the GNU General Public License. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This is an introductory guide for people learning to use a system. It focuses on command-line usage. This is not because everyone will be doing everything at the command line. On the contrary, there are many useful GUI tools and programs in, and some people will be content to stay with these. However, in contrast to GUI programs, which can be learned largely by "click and try", the command-line requires some deliberate learning, and reading documentation. The benefit of this investment is that you will learn the tools and tricks of the command line which are in many cases faster, more powerful, and more flexible than any GUI program. There are many other introductions to on the web; this one is customized for users in UBC Physics and Astronomy. Since I don t want to cover all the possible cases and variations, I ll also assume that you re sitting at an X-terminal of some sort - in other words, a fancy GUI with lots of windows and things. I m going to assume that you ve figured out how to open a terminal or console window (look for something called Konsole or Gnome Terminal). I m going to assume that your shell is the bash shell. If you don t know what that is, don t worry - it s the default shell. You may also want to read Matt Choptuik s introduction to Unix, which you can find here [ Table of Contents The Basics : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 Eleven essential commands : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 Getting help for a specific command : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 File names with spaces : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 Copying and pasting : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 Recalling previous commands : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 Be lazy: use TAB to minimize typing : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 File permissions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 Useful Tools : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 The network is the computer: ssh and scp : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 Finding and searching files : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6 Creating and extracting file archives (zip, gzip and tar) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7 Emacs - a powerful editor : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8 Running long calculations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8 Getting the prompt back after starting a job : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8 Keeping a job running after you log out : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8 Suspending a long-running job and restarting it later : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 Running a series of jobs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 More advanced scripts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 When you re not in the department : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 Accessing data from any Windows computer : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 1

2 without installation - at home or travelling : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 More Quick Tips : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 Scroll with the keyboard : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 Copy with xclip : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 Lots of keyboard shortcuts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 ssh and scp without typing a password each time : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 Send a quick message without starting any mail program : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 Where to go to learn more : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 The Basics Eleven essential commands These are the commands which you have to know in order to be basically functional with a shell (command line). 2

3 ls List directory contents. ls -l long listing with dates and permissions cd ls -a list all, including hidden files (hidden files start with a period) Change directory. cd - change to previous directory cd ~ change to home directory pwd cp cd.. change to parent directory Copy file(s). mv rm Print current (working) directory. cp -r somedir somedest Copy recursively (directory and all contents) Move (or rename) a file (or directory) Delete (remove) a file. rm -r somedir Delete recursively (directory and all contents) rm -ri somedir Delete recursively, but prompt before 3 each removal rm -rf somedir Delete recurs-

4 Getting help for a specific command To get detailed help on a particular command or program, you can try the following. Man pages Info pages KDE or Gnome Help /usr/share/doc If you want help on a specific command (ls for example), type man ls. You move around in man as you do with less: SPACEBAR is forward a page, B is back a page, Q is quit. Info pages are similar to man pages, but contain links and other complex structures. There are many key-strokes for navigating info; if you call info without any arguments, then hit H, you ll get some help on using info. This Applies only if it s KDE or Gnome program. In either case, you can launch the help browser from the Start menu on the Panel, or choose Help from the program menu, or press F1. Every package must install at least some minimal help into a subdirectory in /usr/share/doc. Sometimes it s in html format (read with a browser), sometimes it s plain text (read with less), sometimes it s compressed text (has an ending like.gz, read with zless). The home page of the project Every command or program belongs to some project (or company). Usually they have a home page which provides copious, up-to-date and indexed information (well at least you can hope that they do.) Can t find the project home page? Try [ Tip You can read man and info pages with Konqueror (the KDE web browser) or Galeon, which is nice because then they are nicely formatted and have links and such like. For example, to read the man page on the tar command, enter man:/tar in the address bar; to read the info page on tar enter info:/tar. To get the list of info topics, just enter info:/. File names with spaces Spaces on the command line separate arguments. Therefore file names containing spaces require special treatment to avoid being interpreted as two separate files. There are a couple of methods. You can use quotes: cp "file name with spaces" file_name_without_spaces You can also use the backslash, which indicates that any special significance is to be removed from the following character. Thus a space, instead of being the delimiter for arguments on a command line, is to be interpreted as a regular character. cp file\ name\ with\ spaces file_name_without_spaces Copying and pasting Copying and pasting in is really easy (yes, easier than Windows). Just mark the text you want to copy with the mouse, holding down the left mouse button in the usual way. Then click the middle mouse button (on a wheel mouse the middle button is the wheel) where you want to insert the marked text. Voila! You didn t even need to touch the keyboard! (CTRL-C and CTRL-V also work like you expect them to most of the time.) For example, suppose you just typed a command, and you want to type a another similar command. If you can still see your original command in the console, just mark it with the mouse, then click the middle mouse button anywhere 4

5 in the terminal window to insert the marked command at the prompt. You can now edit this command with the left and right arrow keys before hitting enter to execute it. There s another way to recover and edit previous commands, which I ll cover in the next section. Tip You can double-click to mark a whole work, or triple-click to mark a whole phrase. Remember - you haven t only marked it, you ve put it in the clipboard. Recalling previous commands You can scroll though your previous commands (command history) by using the UP and DOWN arrow keys. A more advanced trick is to use CTRL-R, which is particularly useful when you want to recall a command you used some time ago. Hit CTRL-R and then start typing some fragment of the command you re searching for. The prompt will automatically update to show you the most recent match to the fragment you ve typed so far. If you want the matching command previous to the one shown, hit CTRL-R again. Once you ve got the previous command you re looking for, hit ENTER to run it again, or start editing it. Be lazy: use TAB to minimize typing Some commands and especially some file names can be pretty long. Don t want to type it all? Type the first few letters, then hit TAB. The shell will fill in the rest, as far as there is a unique completion (either command or filename). If there is not a unique completion to the end, you might have to type another character or two and then hit TAB again. File permissions Since is a multi-user system, file permissions are important. In, there are separate read, write and execute permissions for the owner of the file ("user"), the "group", and everyone else ("other"). You can find out what permissions a file has with ls -l. Here s an example: -rw-rw-r-- 1 nodwell mbelab Jul 9 13:10 kate.png The series of 9 characters at the beginning of the line spcifies the permissions in order of owner, group, other. In this case, there are read and write permissions for owner and group, and only read permissions for other. You can also see that the owner is "nodwell", and the group is "mbelab". As an example of changing permissions, let s assume I have a file called foo which I want others in the "mbelab" group to be able to read and write. To do this I change the group to mbelab and set the group read and write permissions: chgrp mbelab foo chmod g+rw foo I should also make sure that the directory that this is in, and all the higher (lower?) directories are actually readable by the group. For example: chmod g+rx /home/nodwell/shared_stuff chmod g+rx /home/nodwell Notice that I also set the executable bit for the directories, which allows someone in the group to actually switch into that directory. (Not very logical I admit): 5

6 To change the group and permissions on a directory and everything in it, including subdirectories and their contents, use the -R (recursive) flag: chgrp -R mbelab /home/nodwell/shared_stuff chmod -R g+rw /home/nodwell/shared_stuff Now suppose that we want all files which are created in /home/nodwell/shared_stuff to automatically have the group mbelab. Assuming you ve already changed the group of this directory to mbelab, you can do this by setting the group sticky bit: chmod g+s /home/nodwell/shared_stuff Useful Tools The network is the computer: ssh and scp If you re using, you re rarely working on just one machine. To log in on another machine, use ssh, like this ssh yourid@physics.ubc.ca So now you have a terminal window on the remote machine. You can only run command-line stuff, right? Wrong! Try typing gedit or kedit or netscape. (I m assuming one of these is actually available on the remote machine.) You might notice that this blocks your terminal window until you close the program again. We ll find a solution to that a little later. You also need to know how to move files around between computers. That s where scp comes in. It s just like cp, but not limited to the local machine. scp somefile yourid@physics.ubc.ca:somedirectory Like cp, scp understands the -r flag, for recursive copy, which is really useful for copying whole directories. scp -r somedir nodwell@physics.ubc.ca:. (What s that dot at the end? on the remote machine.) It s shorthand for "the current directory", which by default will be your home directory Finding and searching files The fastest way to find files is with the locate command. locate is uses a database which is updated every night. This makes it very fast, but it will not find files which have been created the same day. The easiest way to use locate is just to specify a fragment of the file name, for example: locate foo For trimming down the results of your search, grep is invaluable. For example, to find all files which contain both report and eric in the complete file name (including path) we can use: locate report grep eric If you know anything about "regular expressions", then you can do a more specific search. A good intro (in fact probably as much information as you ll ever need) to regular expressions can be found at A Tao of Regular Expressions [ 6

7 If you want to specify more than the file name, for example the date modified or the file size, then the find command is the one to use. find actually searches the disk, so it can be a little bit slower. Here is an example of searching for files which are located in the directory /home/eric/misc and all subdirectories, which start with report, which have been modified in the last 2 days, and which are at least 10kb in size: find /home/eric/misc -name report* -mtime -2 -size +10k If you want to find files by their contents, this can be done by combining a number of tools together. (Combining several simple tools to do one complicated job is the Unix approach, and it is very powerful once learned.) We will use find to construct a list of files, and grep to look for lines containing a certain word. We will combine them with a pipe ( ) and the command xargs which takes the output from one command and uses it as an argument for calling a second command. This sounds complicated, but the example is not too bad: find -type f xargs grep -i report Here we are looking for files in the current directory (and subdirectories) which contain the word "report". The -type f flag ensures that we only get a list of regular files (and not directories and links for example) to pass to grep. The -i flag means ignore case, so we are looking for "Report" as well as "report". If you might have filenames with spaces or other special characters, this won t work quite as expected. In this case we must use: find -type f -print0 xargs -0 grep -i report There is a really good tutorial on finding files in the info pages. If you are using the Konqueror web browser or the Galeon web browser, you can read it by entering info:/find in the address bar. Otherwise type info find on the command line. Creating and extracting file archives (zip, gzip and tar) For a single file, you get the best compression usually with bzip2: bzip2 -zv filein > fileout.bz2 This file can be recovered with bzip2 -xv filout.bz2 > filein For multiple files, put them together in a directory and use tar tar -cvjf file.tar.bz2 directory To extract again use tar -xvjf file.tar.bz2 Although bzip2 gives the best compression, gzip is faster, so you may prefer it. two commands become With gzip compression, the above tar -cvzf file.tar.gz directory tar -xvzf file.tar.gz The most common compression format on Windows systems is pkzip: the corresponding commands available on linux are zip and unzip. You can always use the command unp to uncompress a file in any compression format. anything it couldn t uncompress.) (Well I ve never found 7

8 If you want to use a graphical tool to compress and decompress files, there is ark or file-roller. Emacs - a powerful editor Emacs is a powerful editor. It runs either a text console or graphically, as an X program. (To force it to start in the text console mode, use emacs -nw.) For programming, or HTML, or LaTeX, or other similar structured text files, it is very useful. A good tutorial for Emacs is here [ A quick reference card for emacs can be found here [emacs-refcard.pdf]. Note that the "Meta" key, which is indicated by "M-" on the reference card, is the "Alt" on PC keyboards. Running long calculations Getting the prompt back after starting a job Use & at the end of the command. This puts the job in the background. For example:./myjob 10 & To see all your background jobs (the ones started in the current shell), enter: jobs To bring one of these to the foreground, use: fg %n where n is the job number (yes it needs a % in front of it). To move it to the background again, hit CTRL-Z. This however doesn t just move the job to the background, it suspends it. To get it running again, use bg %n Keeping a job running after you log out Use nohup. For example, suppose you want to run./myjob 20. In this case, you could use: nohup nice./myjob 20 > out_file & There are several things to note here: The & at the end of the command line is there so you get the command prompt back immediately (see the previous section). We have redirected the output to a file out_file with > out_file. If you don t do this, any output to STDIN (normally the console) will automatically go into a file called nohup.out. We ve niced the job to reduce it s execution priority. This is courteous. 8

9 If you want to see what s in nohup.out (or whatever you called it) at any time, you can do the usual cat nohup.out Here s another potentially more useful command: tail -f nohup.out tail shows you the last few lines of the files. In addition, the -f flag ("follow") means that as lines get added to the file, they are displayed on the screen. This looks just like when you run the program without nohup, except when you hit CTRL-C, the program keeps on running in the background. One nice refinement is to have the output mailed to you on completion. Try this: nohup nice./longjob job_options ; cat nohup.out mail $USER & Suspending a long-running job and restarting it later First find the PID (process ID) with top or with ps. For example, I might list all jobs belonging to me with: ps -u eric To stop the job, send it a STOP signal: kill -s STOP PID (replace PID with the actual PID number). It is now no longer running, but it still occupies memory (although the memory it uses will probably be swapped out to disk). When you want to resume execution, give it a CONT signal: kill -s CONT PID Running a series of jobs Suppose you want to run ten jobs overnight. You could just start them all at once (using nohup as described above). However, it would be more efficient to run them sequentially. Besides being faster in total (less multitasking overhead), it is also much more considerate to other users to run your jobs in series instead of in parallel. An easy way to run things in sequence is to use a script. For example: #!/bin/bash # This script runs mycalc with arguments 10 through 100../mycalc 10./mycalc 20./mycalc 30./mycalc 40./mycalc 50./mycalc 60./mycalc 70./mycalc 80./mycalc 90./mycalc 100 If you save this script as docalc, you need to make it executable before you can run it. chmod +x docalc 9

10 You could run it like this nohup nice ~/docalc & More advanced scripts As an example of the things you can do with bash scripts, the example script in the previous section could also have been written like this: #!/bin/bash # This script runs mycalc with arguments 10 through 100. ARGS=" " for ARG in $ARGS do./mycalc $ARG done Obviously, if you have a lot of jobs to run, this is easier than writing a script with one line per job. This just gives you a taste of the possibilities. If you find this kind of thing useful, then you should check out Heiner s SHELLdorado [ When you re not in the department Accessing data from any Windows computer For Windows computers external to the physics local network, you need to get some ssh/scp program. Fortunately, this is easy when you know where to look. There is a free ssh (and scp) program from the physics web site [ exe] (internal access only). A publically accessible download location is here [ftp://ftp.ssh.com/pub/ssh/]. This program has a very nice GUI interface. However you need to have installation rights on the Windows computer to install and use it. For other cases, PuTTy [ comes in very handy. There is a program for an ssh terminal (PuTTY), and an scp program (pscp). The pscp program is particularly elegant, since it doesn t even need to be "installed" on the Windows computer. Just put pscp.exe in the directory to/from which you want to transfer files, then open a terminal window (usually under Accessories), cd to the directory (something like CD C:\Users\Bob), and use pscp like you would use scp at the command line on physics. See the section on scp. Yet another option is Knoppix, which is described in the next section... without installation - at home or travelling There s a fantastic distro called Knoppix [ It s a complete system on a CD. You stick the CD in any PC with a CD drive, boot it up, and you have a functioning system with much useful software, like Mozilla, OpenOffice and SSH. It does a fantastic job of hardware detection, and you can mount the hard disks if you need to read/write to them. It s also easy to establish a network connection. In fact if there s a Windows installation on the computer, it will read the network configuration from the system files on the Windows partition. When finished with Knoppix, pop out the CD and reboot and the computer reverts to its 10

11 former personality. I really recommend that you take a Knoppix CD with you when you travel. It makes it very easy to connect back to physics. More Quick Tips Scroll with the keyboard You can scroll back to see lines which have scrolled off the top of your shell window with CTRL-PAGEUP and CTRL-PAGEDOWN. Copy with xclip Here s another useful trick with X-Windows copying and pasting: you can pipe output directly into the clipboard with xclip. For example, if you want to someone a directory listing, do ls xclip then middle-click to paste into your . Lots of keyboard shortcuts Here are some common keystrokes. Most of these will work at the command line, and in many programs. KDE and Gnome programs may be an exception - their default control key mapping is sometimes closer to Windows. However you can change to Unix Default in the KDE Control Center, under Look & Feel, Key Bindings and in the Gnome Control Center, under Keyboard Shortcuts. Once you learn these key bindings, you will find that you can work very fast across many different programs. In addition to the key bindings described below, there are the standard arrow keys, page up and page down keys and so on. However the ones described below all lie under your fingers, and so are faster once you learn them. 11

12 Table 1. Common editing key bindings CTRL-A Move to the end of the line. CTRL-E Move to the beginning of the line. CTRL-F Move forward one character. CTRL-B Move backward one character. ALT-F Move forward one word. ALT-B Move backward one word. CTRL-V Move one page down. ALT-V Move one page up. CTRL-D Delete one character forward. CTRL-H Delete one character backward. ALT-D Delete one word forward. CTRL-K Delete (Kill) everything from the cursor forwards (to the end of the line). CTRL-U Delete everything from the cursor backwards (to the beginning of the line). CTRL-T Transpose two characters. ALT-T Transpose two words. ESC. Insert the last argument (word) from the previous command. Table 2. Common control key bindings 12

13 CTRL-C Terminate the current program, or sometimes cancel some operation. CTRL-\ Seriously kill the current program!! Use only after CTRL-C has failed! CTRL-D End-of-file. This is often used to signal the end of input, or to exit a program. CTRL-G Cancel the current operation. A VERY useful command to get yourself out of things. CTRL-L Redraw the console. You will find this one useful on physics, where the new mail notification tends to overwrite whatever you are working on. CTRL-Q The only time you need this is if you accidently hit CTRL-S. In that case the console is locked until you hit CTRL-Q to unlock it. Apparently once a long long time ago this was actually a useful feature. CTRL-R Recall command containing characters. After hitting CTRL-R, type the fragment you want to search for. If it returns a command which isn t the one one want, hit CTRL-R again to cycle through matches. current program CTRL-Z Suspend 13 the and put it in the background. This is very

14 ssh and scp without typing a password each time You can create and exchange ssh keys to avoid repeatedly typing your password. I will use the example of connection from a machine called berserk to a machine called physics. On berserk, create an ssh key pair with ssh-keygen -t dsa It will prompt you whether you want a pass-phrase or not. session, but it s rather more secure. It s up to you. If you choose one, you have to type this once per log-in Now copy the.ssh/id_dsa.pub file to physics. From berserk run scp.ssh/id_dsa.pub userid@physics:tempid Here we ve renamed it tempid. Then on physics run cat tempid >>.ssh/authorized_keys This will add the contents of tempid to.ssh/authorized_keys. That s it! Your can now remove the temporary file: rm tempid. Now when you use ssh to login to physics from berserk, you won t be asked for your password! Of course, you can do all the same steps, interchanging berserk and physics to go the other direction. Tip If this doesn t work for you, it might be because the permissions on your home directory are too loose. Running the following command on both berserk and physics might help: chmod -R go-rwx ~ This removes reading, writing and executing permissions from all your files for group and other, leaving only permissions for user (you). Send a quick message without starting any mail program Just type for example: mail bob@physics.ubc.ca Then enter a subject when prompted, followed by the message body. When finished, type CTRL-D. Presto! use this to send quick reminders to myself. I often Where to go to learn more Another introduction to to Unix at UBC has been written by Matt Choptuik. [ You can find it here More handy tips for using the bash shell can be found at Getting to know Bash [ A fantastic resource for unix shells in general and shell programming can be found at Heiner s SHELLdorado [ 14

CS Fundamentals of Programming II Fall Very Basic UNIX

CS Fundamentals of Programming II Fall Very Basic UNIX CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)

More information

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Introduction to remote command line Linux. Research Computing Team University of Birmingham Introduction to remote command line Linux Research Computing Team University of Birmingham Linux/UNIX/BSD/OSX/what? v All different v UNIX is the oldest, mostly now commercial only in large environments

More information

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

CSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/391/

More information

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015 Outline What is Unix? Getting started Streams Exercises UNIX Operating system Servers, desktops,

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

Introduction to the shell Part II

Introduction to the shell Part II Introduction to the shell Part II Graham Markall http://www.doc.ic.ac.uk/~grm08 grm08@doc.ic.ac.uk Civil Engineering Tech Talks 16 th November, 1pm Last week Covered applications and Windows compatibility

More information

COMS 6100 Class Notes 3

COMS 6100 Class Notes 3 COMS 6100 Class Notes 3 Daniel Solus September 1, 2016 1 General Remarks The class was split into two main sections. We finished our introduction to Linux commands by reviewing Linux commands I and II

More information

Using the Zoo Workstations

Using the Zoo Workstations Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions

More information

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the EECS labs that dual boot

More information

Introduction to Linux Organizing Files

Introduction to Linux Organizing Files Introduction to Linux Organizing Files Computational Science and Engineering North Carolina A&T State University Instructor: Dr. K. M. Flurchick Email: kmflurch@ncat.edu Arranging, Organizing, Packing

More information

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12) Objective: Learn some basic aspects of the UNIX operating system and how to use it. What is UNIX? UNIX is the operating system used by most computers

More information

Chapter-3. Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system

More information

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/

More information

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

More information

Outline. Structure of a UNIX command

Outline. Structure of a UNIX command Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory

More information

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Table Of Contents 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands Getting onto the Zoo Type ssh @node.zoo.cs.yale.edu, and enter your netid pass when prompted.

More information

1 Installation (briefly)

1 Installation (briefly) Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB

More information

Basic Survival UNIX.

Basic Survival UNIX. Basic Survival UNIX Many Unix based operating systems make available a Graphical User Interface for the sake of providing an easy way for less experienced users to work with the system. Some examples are

More information

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Stephen Pauwels Computer Systems Academic Year 2018-2019 Overview of the Semester UNIX Introductie Regular Expressions Scripting Data Representation Integers, Fixed point,

More information

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys Hitchhiker s Guide to VLSI Design with Cadence & Synopsys David Money Harris 17 January 2009 The VLSI design tools at Harvey Mudd College are hosted on a Linux server named chips. This document introduces

More information

Introduction to the Linux Command Line

Introduction to the Linux Command Line Introduction to the Linux Command Line May, 2015 How to Connect (securely) ssh sftp scp Basic Unix or Linux Commands Files & directories Environment variables Not necessarily in this order.? Getting Connected

More information

Exploring UNIX: Session 5 (optional)

Exploring UNIX: Session 5 (optional) Exploring UNIX: Session 5 (optional) Job Control UNIX is a multi- tasking operating system, meaning you can be running many programs simultaneously. In this session we will discuss the UNIX commands for

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Linux Command Line Primer. By: Scott Marshall

Linux Command Line Primer. By: Scott Marshall Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and

More information

Introduction to UNIX/Linux

Introduction to UNIX/Linux Introduction to UNIX/Linux Biochemistry Boot Camp 2018 Session #3 Nick Fitzkee nfitzkee@chemistry.msstate.edu Operating system (OS) Some terms Command-line interface (CLI) Graphical user interface (GUI)

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

More information

Introduction to Unix - Lab Exercise 0

Introduction to Unix - Lab Exercise 0 Introduction to Unix - Lab Exercise 0 Along with this document you should also receive a printout entitled First Year Survival Guide which is a (very) basic introduction to Unix and your life in the CSE

More information

CS 460 Linux Tutorial

CS 460 Linux Tutorial CS 460 Linux Tutorial http://ryanstutorials.net/linuxtutorial/cheatsheet.php # Change directory to your home directory. # Remember, ~ means your home directory cd ~ # Check to see your current working

More information

Introduction to UNIX Command Line

Introduction to UNIX Command Line Introduction to UNIX Command Line Files and directories Some useful commands (echo, cat, grep, find, diff, tar) Redirection Pipes Variables Background processes Remote connections (e.g. ssh, curl) Scripts

More information

Working with Basic Linux. Daniel Balagué

Working with Basic Linux. Daniel Balagué Working with Basic Linux Daniel Balagué How Linux Works? Everything in Linux is either a file or a process. A process is an executing program identified with a PID number. It runs in short or long duration

More information

Exploring UNIX: Session 3

Exploring UNIX: Session 3 Exploring UNIX: Session 3 UNIX file system permissions UNIX is a multi user operating system. This means several users can be logged in simultaneously. For obvious reasons UNIX makes sure users cannot

More information

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program Using UNIX. UNIX is mainly a command line interface. This means that you write the commands you want executed. In the beginning that will seem inferior to windows point-and-click, but in the long run the

More information

Lab 2: Linux/Unix shell

Lab 2: Linux/Unix shell Lab 2: Linux/Unix shell Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 6 7 What is a shell? What is a shell? login is a program that logs users in to a computer. When

More information

CS197U: A Hands on Introduction to Unix

CS197U: A Hands on Introduction to Unix CS197U: A Hands on Introduction to Unix Lecture 3: UNIX Operating System Organization Tian Guo CICS, Umass Amherst 1 Reminders Assignment 2 is due THURSDAY 09/24 at 3:45 pm Directions are on the website

More information

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224 Information Technology Part I: Computers and the Internet Laboratory 2 Linux Shell Commands and vi Editor

More information

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Unix tutorial Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Terminal windows You will use terminal windows to enter and execute

More information

Introduction to the Emacs Editor

Introduction to the Emacs Editor Introduction to the Emacs Editor Scott D. Anderson Wellesley College Scott.Anderson@acm.org c Fall 2004 1 What is Emacs? Emacs is an editor: a program that allows you to modify files. Many of you have

More information

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface FREEENGINEER.ORG Learn UNIX in 10 minutes. Version 1.3 Preface This is something that I had given out to students (CAD user training) in years past. The purpose was to have on one page the basics commands

More information

Introduction. File System. Note. Achtung!

Introduction. File System. Note. Achtung! 3 Unix Shell 1: Introduction Lab Objective: Explore the basics of the Unix Shell. Understand how to navigate and manipulate file directories. Introduce the Vim text editor for easy writing and editing

More information

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs; Note: you can find this file under: http://www.cs.queensu.ca/ acmteam/unix.pdf Introduction to Unix Tutorial In this tutorial, you will learn: How to manage your account (user ID, password, shell); Navigating

More information

unix intro Documentation

unix intro Documentation unix intro Documentation Release 1 Scott Wales February 21, 2013 CONTENTS 1 Logging On 2 1.1 Users & Groups............................................. 2 1.2 Getting Help...............................................

More information

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016 Linux Boot Camp Jack, Matthew, Nishad, Stanley 6 Sep 2016 1 Connecting SSH Windows users: MobaXterm, PuTTY, SSH Tectia Mac & Linux users: Terminal (Just type ssh) andrewid@shark.ics.cs.cmu.edu 2 Let s

More information

Recitation #1 Boot Camp. August 30th, 2016

Recitation #1 Boot Camp. August 30th, 2016 18-600 Recitation #1 Boot Camp August 30th, 2016 Welcome to 18-600! Purpose of recitation Useful tools, information pertaining to the labs Hands-on activities Problem solving and exam prep Last ~30 mins

More information

Introduction to Unix: Fundamental Commands

Introduction to Unix: Fundamental Commands Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating

More information

BE CAREFUL! The Summer Research Student s Guide to UNIX

BE CAREFUL! The Summer Research Student s Guide to UNIX BE CAREFUL! The Summer Research Student s Guide to UNIX Luke Leisman adapted from Andrew Butler June 2011 This is a guide designed to help summer researchers navigate the complexities of using a unix/linux

More information

CS4350 Unix Programming. Outline

CS4350 Unix Programming. Outline Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission

More information

Mills HPC Tutorial Series. Linux Basics I

Mills HPC Tutorial Series. Linux Basics I Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create

More information

INSE Lab 1 Introduction to UNIX Fall 2017

INSE Lab 1 Introduction to UNIX Fall 2017 INSE 6130 - Lab 1 Introduction to UNIX Fall 2017 Updated by: Paria Shirani Overview In this lab session, students will learn the basics of UNIX /Linux commands. They will be able to perform the basic operations:

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

Unix basics exercise MBV-INFX410

Unix basics exercise MBV-INFX410 Unix basics exercise MBV-INFX410 In order to start this exercise, you need to be logged in on a UNIX computer with a terminal window open on your computer. It is best if you are logged in on freebee.abel.uio.no.

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

CISC 220 fall 2011, set 1: Linux basics

CISC 220 fall 2011, set 1: Linux basics CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week

More information

Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.

Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2. File system access rights Linux Tutorial #6 Linux provides file system security using a three- level system of access rights. These special codes control who can read/write/execute every file and directory

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings Linux Commands 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material

More information

Crash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book).

Crash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book). Crash Course in Unix For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix -or- Unix in a Nutshell (an O Reilly book). 1 Unix Accounts To access a Unix system you need to have

More information

Utilities. September 8, 2015

Utilities. September 8, 2015 Utilities September 8, 2015 Useful ideas Listing files and display text and binary files Copy, move, and remove files Search, sort, print, compare files Using pipes Compression and archiving Your fellow

More information

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture

More information

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2 CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017 Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop.................................................

More information

Unix Tutorial Haverford Astronomy 2014/2015

Unix Tutorial Haverford Astronomy 2014/2015 Unix Tutorial Haverford Astronomy 2014/2015 Overview of Haverford astronomy computing resources This tutorial is intended for use on computers running the Linux operating system, including those in the

More information

Introduction to UNIX command-line

Introduction to UNIX command-line Introduction to UNIX command-line Boyce Thompson Institute March 17, 2015 Lukas Mueller & Noe Fernandez Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions

More information

An Introduction to Cluster Computing Using Newton

An Introduction to Cluster Computing Using Newton An Introduction to Cluster Computing Using Newton Jason Harris and Dylan Storey March 25th, 2014 Jason Harris and Dylan Storey Introduction to Cluster Computing March 25th, 2014 1 / 26 Workshop design.

More information

UNIX Quick Reference

UNIX Quick Reference UNIX Quick Reference Charles Duan FAS Computer Services August 26, 2002 1 Command Reference Many of these commands have many more options than the ones displayed here. Most also take the option h or help,

More information

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois Unix/Linux Primer Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois August 25, 2017 This primer is designed to introduce basic UNIX/Linux concepts and commands. No

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

Lab #2 Physics 91SI Spring 2013

Lab #2 Physics 91SI Spring 2013 Lab #2 Physics 91SI Spring 2013 Objective: Some more experience with advanced UNIX concepts, such as redirecting and piping. You will also explore the usefulness of Mercurial version control and how to

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: Linux Tutorial How to read the examples When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used: $ application file.txt

More information

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions 1Z0-409 Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-409 Exam on Oracle Linux Fundamentals (Oracle Partner Network)... 2 Oracle

More information

CS CS Tutorial 2 2 Winter 2018

CS CS Tutorial 2 2 Winter 2018 CS CS 230 - Tutorial 2 2 Winter 2018 Sections 1. Unix Basics and connecting to CS environment 2. MIPS Introduction & CS230 Interface 3. Connecting Remotely If you haven t set up a CS environment password,

More information

Useful Unix Commands Cheat Sheet

Useful Unix Commands Cheat Sheet Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List

More information

Traditional Access Permissions

Traditional Access Permissions Traditional Access Permissions There are three types of users: - owner - group - other (aka world) A user may attempt to access an ordinary file in three ways: - read from - write to - execute Use ls l

More information

Basic Shell Commands

Basic Shell Commands Basic Shell Commands Jeremy Sanders October 2011 1. acroread - Read or print a PDF file. 2. cat - Send a file to the screen in one go. Useful for piping to other programs cat file1 # list file1 to screen

More information

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window. Unix background COMP9021, Session 2, 2016 1 Introduction Using the Terminal application, open an x-term window. You type your commands in an x-term window. Many commands take one or more arguments. Many

More information

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010 Lecture 2 Fall 2010 Hussam Abu-Libdeh based on slides by David Slater September 10, 2010 Last Time We had a brief discussion On The Origin of Species *nix systems Today We roll our sleeves and get our

More information

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/ Virtual Machine Anyone have problems installing it? VM: Virtual Box - allows you to run a different operating system within the current operating system of your machine. https://www.virtualbox.org/ Linux

More information

Lecture-4. Introduction to Unix: More Commands, Boot-up Actions and X Window

Lecture-4. Introduction to Unix: More Commands, Boot-up Actions and X Window Lecture-4 Introduction to Unix: More Commands, Boot-up Actions and X Window What You Will Learn We continue to give more information about the fundamental commands of the Unix operating system. We also

More information

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011 Unix/Linux Operating System Introduction to Computational Statistics STAT 598G, Fall 2011 Sergey Kirshner Department of Statistics, Purdue University September 7, 2011 Sergey Kirshner (Purdue University)

More information

Linux Command Line Interface. December 27, 2017

Linux Command Line Interface. December 27, 2017 Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors

More information

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

Introduction to Unix and Linux. Workshop 1: Directories and Files

Introduction to Unix and Linux. Workshop 1: Directories and Files Introduction to Unix and Linux Workshop 1: Directories and Files Genomics Core Lab TEXAS A&M UNIVERSITY CORPUS CHRISTI Anvesh Paidipala, Evan Krell, Kelly Pennoyer, Chris Bird Genomics Core Lab Informatics

More information

Recitation #1 Unix Boot Camp. August 29th, 2017

Recitation #1 Unix Boot Camp. August 29th, 2017 18-600 Recitation #1 Unix Boot Camp August 29th, 2017 Welcome to 18-600! Purpose of recitation Useful tools, information pertaining to the labs Hands-on activities Problem solving and exam prep Last ~30

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

No Food or Drink in this room. Logon to Windows machine

No Food or Drink in this room. Logon to Windows machine While you are waiting No Food or Drink in this room Logon to Windows machine Username/password on right-hand monitor Not the username/password I gave you earlier We will walk through connecting to the

More information

Setting up and running the pyrophosphate tools under the Knoppix GNU Linux system

Setting up and running the pyrophosphate tools under the Knoppix GNU Linux system 1 Setting up and running the pyrophosphate tools under the Knoppix GNU Linux system N.B. These instructions are for using the Knoppix Live CD or DVD. If you want to use the tools on another Debian Linux

More information

Introduction to Linux and Supercomputers

Introduction to Linux and Supercomputers Introduction to Linux and Supercomputers Doug Crabill Senior Academic IT Specialist Department of Statistics Purdue University dgc@purdue.edu What you will learn How to log into a Linux Supercomputer Basics

More information

CS Unix Tools. Fall 2010 Lecture 10. Hussam Abu-Libdeh based on slides by David Slater. September 29th, 2010

CS Unix Tools. Fall 2010 Lecture 10. Hussam Abu-Libdeh based on slides by David Slater. September 29th, 2010 Fall 2010 Lecture 10 Hussam Abu-Libdeh based on slides by David Slater September 29th, 2010 Vim = Awesome! Vim is a powerful lightweight text editor. The name Vim is an acronym for Vi IMproved vi is an

More information

Command Line Interface The basics

Command Line Interface The basics Command Line Interface The basics Marco Berghoff, SCC, KIT Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Motivation In the Beginning was the Command Line by Neal Stephenson In contrast

More information

A Brief Introduction to Unix

A Brief Introduction to Unix A Brief Introduction to Unix Sean Barag Drexel University March 30, 2011 Sean Barag (Drexel University) CS 265 - A Brief Introduction to Unix March 30, 2011 1 / 17 Outline 1 Directories

More information

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction

More information

Getting Started with UNIX

Getting Started with UNIX Getting Started with UNIX What is UNIX? Boston University Information Services & Technology Course Number: 4000 Course Instructor: Kenny Burns Operating System Interface between a user and the computer

More information

Week 2 Lecture 3. Unix

Week 2 Lecture 3. Unix Lecture 3 Unix Terminal and Shell 2 Terminal Prompt Command Argument Result 3 Shell Intro A system program that allows a user to execute: shell functions (e.g., ls -la) other programs (e.g., eclipse) shell

More information

Linux Essentials Objectives Topics:

Linux Essentials Objectives Topics: Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives

More information