Question: 1. The simplest Linux commands can be used without options. a. Enter ls. What does this command do? Enter pwd. What does this command do?

1. The simplest Linux commands can be used without options. a. Enter ls. What does this command do? Enter pwd. What does this command do? b. Type cd ~. What does this command do? How does your prompt change? Type ls again. How does this differ from part a? c. Type each of these commands and briefly explain what each does. whoami, arch, uname, date, vmstat. d. Type which arch, which ifconfig, which vmstat. What are the responses toeach? Typewhichuseradd. Whatwastheresponse? Why? Whatdoeswhich do? 2. We will now explore commands that use options. a. Type ls. Now type ls l. How do the two differ? b. Type host. As the command expects a hostname, you are given the commands usage. Type host kosh.nku.edu. What is the response? Type host v kosh.nku.edu. What does the v option do? Look at the response from the command, what sections do you see? The IP address given at the bottom of this command is the DNS server that responded to your host command. Type host i IPaddr where IPaddr is the IP address of the DNS server from the previous command. What is the name of the DNSs IP alias? What does the i option do? c. Type ps which shows you all active processes. There are a number of options available. For ps, most of these options do not start with a hyphen. Type each of these: ps a, ps u and ps x. How do the responses differ? 3. To see what a command does (including its available options), view the commands man page. a. What does man stand for? b. Type man ps. Use the space bar or arrow keys to control moving up and down in the man page and q to exit. What does this man page tell you about ps? Provide a short (2-3 line) summary. Use man to explore each of these commands and answer the following questions: c. ls: what does a do? what does r do? what does R do? d. who: what does b do? what does H do? e. vmstat: what does this instruction do? there are a number of synopses, what are these? 4. The history list allows you to recall previous commands. a. Type history. How many commands are in your list? b. To recall the most recent instruction, type !!. Type this. What happens? Why? c. To recall a previous instruction, type !# where # is the number in the list. For instance, type!1. Whathappened? Why? Type!nwherenisthenumberoftheinstructionprior to the history command (this should correspond to the man instruction from step 3). What happened? d. You can also type !str where str is a string of the beginning of the command. Type !m. This should recall your last man command. Type !p and it should recall your last ps command (from 2c). Type !ho. What command is executed? To execute this, why did you use !ho instead of !h? e. Type history again. How much longer is your list now than it was in step 4a? 5. An a. To see what aliases are already defined, type alias. How many aliases are there? b. Define your own alias with the notation alias name=command. If the command on the alias is a definition that allows you to execute an instruction through a shortcut. right side contains one or more blank spaces, enclose the command in marks. Type this one: alias home=cd ~. Type home to make sure it works. Explain the command and why we called it home. c. Enter an alias to perform a long listing of the current directory, showing all files in reverse alphabetical order. Use man as needed on ls. Test it out to see if it works correctly. What alias did you create? d. Enter an alias to output your current working directory, your user name, the architecture, and the date. Specify multiple instructions by separating each instruction with a semicolon (;). What alias did you enter? e. To remove a defined alias, type unalias name where name is the name of the alias. Type unalias home Type alias. Is the home alias listed? NOTE: you can recreate your home alias if you want to keep it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!