lecture one. objective: provide description of the command-line editor of linux operating system....

14
Linux - Ubuntu Lecture One

Upload: melanie-crawford

Post on 14-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Linux - UbuntuLecture One

Objective:Provide description of the Command-Line

Editor of Linux operating system.Enable students to understand the practical

side of Linux operating system.Understand and implement the following

commands: cd command. pwd command. ls command. Cp command. mkdir command.

The Command-Line EditorBefore looking at the command-line

instructions, I’d like to explore the various ways you can enter and edit text on the command line, because numerous options are avail-able to make your life a lot easier.

For example, once you have entered one or more commands, you can scroll back and forth through the command history to reselect or edit previous commands by using the Up and Down cursor keys, or Ctrl-N for Next and Ctrl-P for Previous, as you can see from Table 7-2.

Bash CommandsRunning Bash commands is quite easy. For

example, you can verify the location of the current folder simply by entering the command pwd , which stands for print working directory, to print out the full path of the current working folder. Or you can see which files and subfolders are in the current folder by entering ls , which stands for list con-tents. Table 7-2 details some of the more common commands relating to files and folders (along with what they do)

File and folder Commands

File and folder Commands

Now let’s look at some commands, starting with the cd command, which is used to change directory (or folder). In its simplest form, you just enter something like the following :

1 -)cd /home

2 -)PWD Ubuntu should report that you are now in the home

folder Display the full path of the current working folder.

The cd, PWD, and ls Commands

You can try navigating back up a level to the / directory by entering this:3)- cd ..

The cd, PWD, and ls Commands

4)- ls • List all files and folders in the current folder (except hidden ones).5)- ls -l• Display all files and folders one line at a time with extended

information (long form).6)- ls -a• Display all files and folders (including hidden ones).7)- ls -la• Display all files and folders (including hidden ones) in long form.

The cd, PWD, and ls Commands

The cp and mkdir Commands8)- CP• The cp command takes two arguments: an existing file to copy

and a destination. So, for example, if you have the file accounts.txt and would like to make a backup file, you can issue this command:

o cp accounts.txt accounts.bak

The cp and mkdir Commands9)- mkdir• Create folder .

Conclusion: Learn Linux operating system used to

implement command line editor.

Understand and implement the cd, ls, cp, mkdir commands.