Question

In: Computer Science

What is the purpose of a Shell? How is a Shell used?

What is the purpose of a Shell? How is a Shell used?

Solutions

Expert Solution

The shell is a command-line interface, which means it is purely text-based. The user can type in commands to perform functions such as run programs, open and browse directories, and view processes that are currently running. Since the shell is only one layer above the operating system, you can perform operations that are not always possible using the graphical user interface (GUI). Some examples include moving files within the system folder and deleting files that are typically locked. The catch is, you need to know the correct syntax when typing the commands and you may still be prompted for a password in order to perform administrative functions.

Shells are most commonly associated with Unix, as many Unix users like to interact with the operating system using the text-based interface. Two common Unix shells are the Bourne shell and the C Shell, which is used by BSD. Most Unix systems have both of these shells available to the user. Windows users may be more familiar with DOS, the shell that has long been included with the Windows operating system. Most computer users have no need to use the shell interface, but it can be a fun way to perform functions on your computer.


There are three main uses for the shell:

Interactive use

Customization of your UNIX session

Programming

1. Interactive Use
When the shell is used interactively, the system waits for you to type a command at the UNIX prompt. Your commands can include special symbols that let you abbreviate filenames or redirect input and output.

2. Customization of Your UNIX Session
A UNIX shell defines variables to control the behavior of your UNIX session. Setting these variables will tell the system, for example, which directory to use as your home directory, or the file in which to store your mail. Some variables are preset by the system; you can define others in start-up files that are read when you log in. Start-up files can also contain UNIX commands or special shell commands. These will be executed every time you log in.

3. Programming
UNIX shells provide a set of special (or built-in) commands that can be used to create programs called shell scripts. In fact, many built-in commands can be used interactively like UNIX commands, and UNIX commands are frequently used in shell scripts. Scripts are useful for executing a series of individual commands. This is similar to BATCH files in MS-DOS. Scripts can also execute commands repeatedly (in a loop) or conditionally (if-else), as in many high-level programming languages.


Related Solutions

What is the purpose of the ISO14001 and how is it used? What problems could arise...
What is the purpose of the ISO14001 and how is it used? What problems could arise when using it? Does it apply to all businesses? What non-sustainable business products or practices does it fail to address? Explain your answers.
What is the purpose of a “convenience translation”? How are they used in financial analysis? What...
What is the purpose of a “convenience translation”? How are they used in financial analysis? What are some features of financial statements that a company might translate in a convenience translation?
What is the purpose of the mass haul diagram? How is it used in the computation...
What is the purpose of the mass haul diagram? How is it used in the computation of earthworks for roadway alignments?
What is a SWOT analysis? What is it used for? What is the purpose of a...
What is a SWOT analysis? What is it used for? What is the purpose of a SWOT analysis? How is a SWOT analysis best used in the planning process?
What is a memo format and when it is used? What is the purpose of an...
What is a memo format and when it is used? What is the purpose of an incident report? Give an example from a real-life situation that shows when an incident report should be written. When writing a travel report, we need to have an introduction (the first paragraph or two paragraphs), a description of activity/service, a cost accounting, and a conclusion (assessment). Explain what the introduction and the conclusion should generally include in terms of their content. Briefly explain what...
liquid oil is used in the tube side of a shell-and-tube heat exchanger with two shell...
liquid oil is used in the tube side of a shell-and-tube heat exchanger with two shell passes and four tube passes. water is heated in the shell side from 10°C to 50°C while the oil is cooled from 90°C to 60°C. the overall heat transfer coefficient is 53 W/m^2*K. the specific heat of the oil is 2.0 kJ/kg*K. Using the NTU - effectiveness method, calculate the area of the heat exchanger for a total energy transfer of 500 kW. what...
Analyze and evaluate how the SHELL Model can be used variously, and in practical terms, during...
Analyze and evaluate how the SHELL Model can be used variously, and in practical terms, during a post-accident investigation as analysis tool, as an accident prevention tool, and as an aviation safety training tool. Provide examples. Then apply these applications of the SHELL Model to overall improvements of aviation safety
A shell-and-tube heat exchanger with two tube passes and baffled single shell pass is used as...
A shell-and-tube heat exchanger with two tube passes and baffled single shell pass is used as oil cooler. Cooling water at 20°C flows through the tubes at a flow rate of 4.082 kg/s. Engine oil enters the shell side at a flow rate of 10 kg/s. The inlet and outlet temperatures of oil are 90°C and 60°C, respectively. The overall heat transfer coefficient based on the outside tube area (Uo) is 262 W/m2⋅K. The specific heats of water and oil...
What are three multiplexing schemes used in GSM and what is their purpose?
What are three multiplexing schemes used in GSM and what is their purpose?
What is a TLB, what is stored in it, for what purpose it is used, and who manages it?
What is a TLB, what is stored in it, for what purpose it is used, and who manages it? Why the instruction cache and date cache require separate TLBs? What techniques are used to reduce the TLB miss penalty?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT