Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 240 Introduction to UNIX Instructor: Sue Sampson.

Similar presentations


Presentation on theme: "CIS 240 Introduction to UNIX Instructor: Sue Sampson."— Presentation transcript:

1 CIS 240 Introduction to UNIX Instructor: Sue Sampson

2 CIS240 – Session Log-in Sessions: Allow concurrent logins Six are available – F1 through F6 By default, when you first log in, you are using F1 session Command: who = shows which user is logged in, which session they are using, and time of log in.

3 CIS240 – Using the vi(sual) editor Text Editors: Applications programs that allow you to create and edit text files Common UNIX editors are vi, emacs, and pico We will be using vi in CIS 240

4 CIS240 – Using the vi(sual) editor Initiating: Command: vi Example: vi /student01/outline.txt vi has two modes: Command mode Insert mode Commands are case sensitive

5 CIS240 – Using the vi(sual) editor Command Mode: Input is interpreted as commands to vi, NOT TEXT Typing text will confuse vi and the results will be unpredictable

6 CIS240 – Using the vi(sual) editor Insert Mode: Input will be interpreted as text to be inserted or appended into a document The same letters that represented commands in command mode are now inserted as text

7 CIS240 – Using the vi(sual) editor Switching to Insert Mode: i insert new text before the cursor I insert new text at the beginning of a line a Append new text after the cursor A Append new text at the end of a line o Open a line below the current line and insert O Open a line above the current line and insert

8 CIS240 – Using the vi(sual) editor Returning to Command Mode: Press the key

9 CIS240 – Using the vi(sual) editor Deleting Text: Done in Command Mode x deletes the current character X deletes the previous character dd deletes current line into paste buffer (p pastes it back into the file) * You can delete multiple characters or lines by prefacing the command with a number – no space

10 CIS240 – Using the vi(sual) editor Moving around the document: (when arrow keys don’t work) k go up one line j go down one line l go right one character h go left one character f move forward one word b move back one word G go to line (default is end) - prefacing the command with a number places cursor on that line.

11 CIS240 – Using the vi(sual) editor Exiting vi: Press to enter command mode Type :q! to quit without saving Type :wq to save and quit Type :q to quit if your document is unchanged since the time you opened it

12 CIS240 – Using the vi(sual) editor What to do if things go wrong: Enter Command mode Quit without saving When all else fails, hit CTRL Z, this stops current process Lab Worksheet 2 – not graded Lab Homework 1 - graded


Download ppt "CIS 240 Introduction to UNIX Instructor: Sue Sampson."

Similar presentations


Ads by Google