Execute the alias command and view the list of aliases

Assignment Help Operating System
Reference no: EM131056252

Purpose: Customize a user account.

NOTE: These instructions were written with reference to version.

REMEMBER: You can exit vi without saving any changes by pressing the ESC key, then colon, q, exclamation point (:q!).

1. Boot your system and open a command shell.

2. Execute the alias command and view the list of aliases available to your user identity. Note that this list will vary from distribution to distribution.

3. Issue the command bash to create a new shell atop the one opened previously.

4. At the command prompt, create an alias which will display a long listing of all of the files in the directory, converting the sizes to human-readable format, and including all of the "dotfiles" except for the current directory (.) and the parent directory (..).
alias lh='ls -Alh'

(NOTE: The spaces and single quotes are important.)

5. Test your new command; use the alias command with no arguments to view it.

6. Now use the exit command to close the shell you opened previously. You should still see a command prompt, since that shell lay over the top of the original window. Try your lh alias again - it does not work! The alias was known to that command shell, but it vanished when that shell closed.

7. Make sure you are located in your home directory, then open the .bashrc file for editing.

8. Search for a good place to add aliases to that file (do not use a separate file), then enter the same command you used at the command line earlier. Adding the command to the configuration file will make it available whenever a new shell is started.

9. Close the vi editor and try your new alias - it does not work!

10. Now type the command bash; recall that this creates a new command shell over the top of the one you are currently using. Try the alias now. What changed to make it work?

11. Right-click on the desktop and explore the options for customizing your background. Can you see how you would go about placing an image there?

12. Bring up a command shell and verify that you are currently working in your home directory. Create a new directory there; give it the name Themes.

13. Visit the part of the GNOME web site devoted to creating new looks for desktops: art.gnome.org. Select the Backgrounds tab, find an image you like, and save it to your Themes directory.
NOTE: This may take some effort. The image may be embedded in an HTML wrapper, so you may have to save it by right-clicking.

14. Click on System Settings, then Appearance. Note that this is the same window you saw earlier. Choose the Background tab. The image(s) you downloaded are not listed as options, here. Click the +Add button (it might appear as a + button), navigate to your Themes directory, and add the new images to the list. Change your background.

15. Go back to the GNOME artwork web page and select the Themes tab. Click on Window Borders and select an entry from that area for download. When you download it, save the file rather than running the Theme Installer. Where is the file saved?

Move the file from that location to your Themes directory. Now go back to your Appearances window (re-open the window if you have closed it). Click the Themes tab. Click the Install button, navigate to your Themes directory, and select the theme you downloaded. Click Open to install it.The lecture notes (Powerpoint slides) compare the configuration of your Ubuntu system to Windows XP. However, many students are more familiar with Windows Vista and Windows 7. Augment the comparison in the slides with the features of those operating systems - are there things which interfere with your comparison?

Explain your position and be sure to include a real world example in your response. Be sure to include your cited your source(s) to support your position.

Worksheet

Purpose: Customize a user environment.

NOTE: These instructions were written with reference to version 12.04LTS of Ubuntu.

REMEMBER: You can exit vi without saving any changes by pressing the ESC key, then colon, q, exclamation point (:q!).

1. Boot your system and open a command shell.

2. Execute the command echo $PATH to view the list of directories included in your search path. When you issue a command, the OS looks in these locations for the code that corresponds to the command. Use the set | more command (note the use of the pipe) to view the information included in your environment. Concentrate on the first few pages of output. Now use the printenv command to view your environment variables. What is the difference between the set and the printenv commands?

3. Issue the command bash -l to create a new login shell atop your original shell.

4. Execute the command echo $PATH to view the list of directories included in your search path. What is the most notable change (if any)?

5. Type exit to return to your original command shell. Check to see that the PATH variable has returned to its original value.

6. Execute the command ZARKOV='... it is my fault the earth is being destroyed?' (DO NOT use any spaces, but DO use single quotes).

7. Use the printenv command to view the information included in your environment. Notice that ZARKOV is included on the list now. Also note the contents of the variables mentioned in the lecture.

8. Issue the bash command to start a new shell (NOT a login shell). Run the printenv command again - notice that the ZARKOV variable has disappeared.

9. Type the exit command to return to your original shell, then use the printenv command to view ZARKOV; notice that it remained a part of the orginal shell even when the new one was opened above it.

10. Now issue the command export ZARKOV - this command will make the variable available to children of the original shell. Issue the bash command to open a child shell and use the printenv command to verify that the child has access to the variable.

11. Use the exit command to close the child shell and return to the parent. Start a new login shell using the bash -l command. Is the ZARKOV variable carried into the new shell? Did you expect it to be?

12. Use the exit command to close the child shell. Issue the command unset ZARKOV to remove that variable from the list. (NOTE: If you perform a printenv command, you will see the line _=ZARKOV at the end of your list; the underscore is a special-purpose variable. Your ZARKOV really has been removed.)

13. Make sure that your current working directory is your home directory, then edit ~/.profile.

14. Near the end of the file, add a line which reads:
export ZARKOV='Get your toothbrush!'

15. Save your changes and close the file. Then perform the printenv command to show that your ZARKOV variable does not exist.

16. Run the bash command, then the printenv command - ZARKOV does not appear!

17. Close that shell with the exit command, then open a new login shell with the bash -l command - NOW your ZARKOV variable is visible.

18. Close that shell with the exit command, then open the ~/.profile for editing again. Right below the line in which you assigned a value to the ZARKOV variable, add a line which extends that value:
export ZARKOV=$ZARKOV' and whatever!'
Re-open the login shell to see that your change has taken effect.

Why is the $ZARKOV included in that command? What would happen if it were not there?

19. Use the command echo $PATH to view the contents of that environment variable. Recall the work we did with processes earlier in the course. In your current shell, which is a login shell, is your personal bin directory included in the search path?

Exit the login shell; is your personal bin directory there now?

Find the line in your ~/.profile which includes that directory and write it here:

Why is the $PATH included in the assignment?

(To make the next set of instructions easier, maximize your terminal window.)

20. Issue the command echo $PS1 to view the contents of the prompt string. You may safely ignore a good chunk of that string - the ${debian_chroot:+($debian_chroot)} part - since it is empty in our installation of Ubuntu. Compare the remainder of the prompt string to what you see displayed on your screen; interpret what you see. (NOTE: The @ and : are displayed literally, and the \$ produces a $.)

\u ____________________________________________________________

\h ____________________________________________________________

\w ____________________________________________________________

21. We will now search through the bash manual page for information about the prompt string. To perform a search, you type the slash character (/), then type the string for which you wish to search. In this case we will search for the string "prompting", so type man bash to bring up the manual page. Once it is displayed, type the / character, then the string prompting and hit ENTER. You will see your search string highlighted at the top of the page. Read that section: what does the man page identify as the default value of the prompt string? Do you see that on your system?

22. Repeat your search, so that you can view the next instance of the string "prompting". In this section you see descriptions of the characters used in prompt strings.

23. Leave the man page up in that window, and open a new one. In the new window, issue the command:
PS1='Havent you any spirit at all? '
(NOTE: The single quotes are important.) Now change the prompt to the value that the man page identified as the default:
PS1='\s-\v\$ '
What is displayed?

24. View the man page again. Imagine that you are working on a computer with a hostname of mongo.bellevue.edu, that it is 4:00PM, and that you are on command number 100. What command would set your prompt string so that it contained
mongo 16:00 100 >

25. Given that the control sequences used to define the prompt string are particular to the BASH shell, which configuration file should be used to set a user's individual prompt?

Verified Expert

The solution in three files which are discussed about comparison between Ubuntu operating system ,windows XP,Window 7 and Windows vista and it is prepared in MS word ,referenced in APA format. The second solution file based on alias command in Ubuntu OS and answered required command and executed in Ubuntu environment. The last file discussed about the printenv,env variable commands and man command with prompting string.

Reference no: EM131056252

Questions Cloud

Eastimating the cost of capital of the firm : Eastimating the cost of capital of the firm, should include estimating cost of equity, cost of debt, the market value of equity, market value of debt, and average weighted average cost of capital for apple.
Divided between capital gains yield and dividend yield : Suppose you know that a company’s stock currently sells for $62 per share and the required return on the stock is 12 percent. You also know that the total return on the stock is evenly divided between a capital gains yield and a dividend yield.
Which fund has offered the best risk adjusted return : Suppose the market risk premium is 9% and the risk free rate is 6% In a period where the market moved up by 30% during a single year, you observe the following risk and return data for mutual funds: Which fund has offered the best risk adjusted retur..
What was the closing price for stock : What was the closing price for this stock that appeared in yesterday’s paper? If the company currently has 34 million shares of stock outstanding, what was net income for the most recent four quarters?
Execute the alias command and view the list of aliases : CIS 240 - Execute the alias command and view the list of aliases available to your user identity. Note that this list will vary from distribution to distribution and
An investment project has annual cash inflows : An investment project has annual cash inflows of $5,400, $6,500, $7,300, and $8,600, and a discount rate of 10 percent. What is the discounted payback period for these cash flows if the initial cost is $9,000?
Expects dividends to grow at a constant rate : Barton Industries expects next year's annual dividend, D1, to be $2.10 and it expects dividends to grow at a constant rate g = 4.9%. The firm's current common stock price, P0, is $23.30. If it needs to issue new common stock, the firm will encounter ..
Cost of common equity by using three approaches : Barton Industries estimates its cost of common equity by using three approaches: the CAPM, the bond-yield-plus-risk-premium approach, and the DCF model. Barton expects next year's annual dividend, D1, to be $2.10 and it expects dividends to grow at a..
Dividends are expected to grow-what is current stock price : The Jackson–Timberlake Wardrobe Co. just paid a dividend of $1.55 per share on its stock. The dividends are expected to grow at a constant rate of 6 percent per year indefinitely. Investors require a return of 14 percent on the company's stock. What ..

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd