Free Essay

Netw240 Week 2 Lab Report: Linux Commands and Directories

In:

Submitted By Jtexaz03
Words 1575
Pages 7
Name: | | DSI# | | Date | |

NETW240 Week 2 Lab Report: Linux Commands and Directories

Step 2: File System Navigation

1: Display a long listing of the root ( ⁄) directory. Enter ls -l ⁄ Verify that the output is from the ⁄etc directory and is a long list.

What type of files may you find in this directory? Write your answer below. binbootcgroupdevetchomeliblost+foundmediamntoptprocrootsbinselinuxsrvsystmpusrvar |

2: Display a long listing of the ⁄etc directory. Enter ls -l ⁄etc Verify that the output is from the ⁄etc directory and is a long list.

What type of files may you find in this directory? Write your answer below. |

3: Display a long listing of the ⁄bin directory.

Enter ls -l ⁄bin. Verify that the output is from the ⁄bin directory and is a long list.

What type of files may you find in this directory? Write your answer below. |

4: Display a long listing of the ⁄sbin directory.

Enter ls -l ⁄sbin. Verify that the output is from the ⁄sbin directory and is a long list.

What type of files may you find in this directory? Write your answer below. |

5: Display a long listing of the ⁄dev directory.

Enter ls -l ⁄dev. Verify that the output is from the ⁄dev directory and is a long list.

What type of files may you find in this directory? Write your answer below. crw--w---- 1 root tty 4, 8 Jan 22 01:43 tty8crw--w---- 1 root tty 4, 9 Jan 22 01:43 tty9crw-rw---- 1 root dialout 4, 64 Jan 22 01:43 ttyS0crw-rw---- 1 root dialout 4, 65 Jan 22 01:43 ttyS1crw-rw---- 1 root dialout 4, 66 Jan 22 01:43 ttyS2crw-rw---- 1 root dialout 4, 67 Jan 22 01:43 ttyS3crw-r----- 1 root root 10, 223 Jan 22 01:43 uinputcrw-rw-rw- 1 root root 1, 9 Jan 22 01:43 urandomcrw-rw---- 1 root root 252, 0 Jan 22 01:43 usbmon0crw-rw---- 1 vcsa tty 7, 0 Jan 22 01:43 vcscrw-rw---- 1 vcsa tty 7, 1 Jan 22 01:43 vcs1crw-rw---- 1 vcsa tty 7, 2 Jan 22 01:44 vcs2crw-rw---- 1 vcsa tty 7, 3 Jan 22 01:44 vcs3crw-rw---- 1 vcsa tty 7, 4 Jan 22 01:44 vcs4crw-rw---- 1 vcsa tty 7, 5 Jan 22 01:44 vcs5crw-rw---- 1 vcsa tty 7, 6 Jan 22 01:44 vcs6crw-rw---- 1 vcsa tty 7, 128 Jan 22 01:43 vcsacrw-rw---- 1 vcsa tty 7, 129 Jan 22 01:43 vcsa1crw-rw---- 1 vcsa tty 7, 130 Jan 22 01:44 vcsa2crw-rw---- 1 vcsa tty 7, 131 Jan 22 01:44 vcsa3crw-rw---- 1 vcsa tty 7, 132 Jan 22 01:44 vcsa4crw-rw---- 1 vcsa tty 7, 133 Jan 22 01:44 vcsa5crw-rw---- 1 vcsa tty 7, 134 Jan 22 01:44 vcsa6crw-rw---- 1 root root 10, 63 Jan 22 01:43 vga_arbitercrw------- 1 root root 10, 58 Jan 22 01:43 vmcidrwxr-xr-x 2 root root 80 Jan 22 01:43 VolGroupcrw-rw-rw- 1 root root 10, 57 Jan 22 01:43 vsock |

What is this directory use for? Write your answer below. a special directory that holds information regarding peripherals /dev/ttys0, /dev/had, etc |

6: Display a long listing of the ⁄usr directory.

Enter ls -l ⁄usr. Verify that the output is from the ⁄usr directory and is a long list.

What type of files may you find in this directory? Write your answer below. [root@host11 ~]# ls -l /usrtotal 184dr-xr-xr-x. 2 root root 49152 Oct 10 17:14 bindrwxr-xr-x. 2 root root 4096 Oct 1 2009 etcdrwxr-xr-x. 2 root root 4096 Oct 1 2009 gamesdrwxr-xr-x. 37 root root 4096 Dec 18 2013 includedrwxr-xr-x. 6 root root 4096 Apr 13 2011 kerberosdr-xr-xr-x. 142 root root 69632 Jan 8 2014 libdrwxr-xr-x. 23 root root 12288 Jan 8 2014 libexecdrwxr-xr-x. 11 root root 4096 Jan 26 2011 localdr-xr-xr-x. 2 root root 12288 Oct 10 17:13 sbindrwxr-xr-x. 248 root root 12288 Dec 18 2013 sharedrwxr-xr-x. 4 root root 4096 Jan 26 2011 srclrwxrwxrwx. 1 root root 10 Jan 26 2011 tmp -> ../var/tmp |

7: Display a long listing of the ⁄home directory.

Enter ls -l ⁄home. Verify that the output is from the ⁄home directory and is a long list.

What type of files may you find in this directory? Write your answer below. [root@host11 ~]# ls -l /hometotal 4drwx------. 28 vlab vlab 4096 Jan 22 02:12 vlab |

8: Display a long listing of the ⁄root directory and its hidden files.

Enter ls -al ⁄root. Verify that the output is from the ⁄root directory and is a long list.

What type of files may you find in this directory? Write your answer below. -rw------- 1 root root 16 Dec 18 2013 .esd_authdrwx------. 4 root root 4096 Jan 22 01:44 .gconfdrwx------. 2 root root 4096 Jan 22 02:04 .gconfddrwx------. 6 root root 4096 Jan 8 2014 .gnome2drwx------. 2 root root 4096 Jan 26 2011 .gnome2_private-rw-r--r-- 1 root root 107 Dec 18 2013 .gtk-bookmarksdr-x------ 2 root root 0 Jan 22 01:44 .gvfs-rw------- 1 root root 13640 Jan 22 01:44 .ICEauthority-rw-r--r-- 1 root root 448 Jan 22 01:44 .imsettings.log-rw-r--r--. 1 root root 52582 Jan 26 2011 install.log-rw-r--r--. 1 root root 10459 Jan 26 2011 install.log.syslog-rw-------. 1 root root 76 Jan 26 2011 .lesshstdrwxr-xr-x 3 root root 4096 Dec 18 2013 .localdrwxr-xr-x 2 root root 4096 Dec 18 2013 Musicdrwxr-xr-x 2 root root 4096 Dec 18 2013 .nautilusdrwxr-xr-x 2 root root 4096 Dec 18 2013 Picturesdrwxr-xr-x 2 root root 4096 Dec 18 2013 Publicdrwx------ 2 root root 4096 Dec 18 2013 .pulse-rw------- 1 root root 256 Dec 18 2013 .pulse-cookie-rw-r--r--. 1 root root 129 Dec 3 2004 .tcshrcdrwxr-xr-x 2 root root 4096 Dec 18 2013 Templatesdrwxr-xr-x 2 root root 4096 Dec 18 2013 Videos-rw------- 1 root root 1607 Jan 8 2014 .viminfodrwxr-xr-x 2 root root 4096 Jan 22 01:44 .vnc-rw------- 1 root root 51 Jan 22 02:12 .xauthjxNacT-rw------- 1 root root 0 Jan 8 2014 .xauthNCEoLh-rw------- 1 root root 217 Jan 22 01:44 .Xauthority |

What is this directory use for? Write your answer below. this is the home directory for super user, do not confuse this folder with / |

9: Return to your home directory.

Enter cd ˜. Enter pwd.

What does the acronym pwd stand for? Write your answer below. 'pwd' stands for 'Print Working Directory |

What is the output of the pwd command? Write your answer below. > |

Character “˜” represents your home directory, regardless of who you are logged in as.

What is a home directory used for? Write your answer below. The user home directories are identified by the Linux login user name and can usually be found under a parent directory called /home |

12: Change directory.

Enter cd file-cabinet. Enter ls. Enter pwd.

What directory are you in? Write your answer below. Home directory |

13: Delete the directory.

Enter ls. Enter rmdir file-cabinet. Enter ls.

Was the directory file-cabinet deleted? Write your answer below. yes |

14: Delete the files.

Enter ls. You should still be able to see both the example1 and example2 files. Enter rm example* (* represents zero or more characters). Enter ls.

Were the example1 and example2 files deleted? Write your answer below. yes |

Step 3: Use the nano command line editor to create and modify files.

Action:
1: Navigate to your home directory.

Enter cd ~. Enter pwd. What directory are you in currently? Write your answer below. Home Directory |

2: Use nano to create a file.

Enter nano myfile1.

You are now in Editor Mode for the file myfile1.

3: Add content to the file.

At this point, you can type in some text. Type in your full name, address, and phone number on different lines.

4: Control Keys for nano.

Note the control menu at the bottom of the nano text editor. The (^) symbol refers to the Ctrl key, so ^X (Exit) refers to simultaneously pressing the Ctrl and X keys. Other common control keys are ^K and ^U for cut and paste operations and ^R for opening a new file. ^W is a control key for finding text in a file.

If you are using nano as your text editor and Internet Explorer or Chrome as your browser, you cannot use Ctrl-O to save your file. This hotkey is used by IE and Chrome to open files. You will have to exit and save as follows: press Ctrl-X (Exit) and at the prompt Save Modified Buffer, press Y then Enter. This will save the file and exit the text editor. Mozilla Firefox does not have this issue with Ctrl-O.

5: Save your modifications and exit.

Press Ctrl-O and press Enter to save your myfile1 file.

Press Ctrl-X to exit the nano command line text editor.

6: Check the content of your file.

Enter cat myfile1.

You now can see your contents of the myfile1 file.

Capture the Skillsoft desktop and paste In the text box below |

Similar Documents