Command Line Scripting Flashcards
What is unix shell?
It is a command line interpreter or shell that provides a command line user interface for unix like operating systems. It is used to execute shell scripts. For example Bash is a unix shell and command language.
What are three examples of command line scripting?
- BASH (Bourne Again Shell)
- Command Prompt
- PowerShell
What is a scripting language?
It is a series of commands that tells the program/computer what to do. The code is executed one line at a time.
What is syntax?
It is just words (not numbers and no decimals). It is a a combination of words and applies to any language, it is part of a script.
What is GUI (Graphical User Interface)?
It is what the user sees. E.g. website, program. Before GUI we had just a basic command prompt.
What can the command prompt be used for?
It can be used for gaining statistical data such as an IP address or solving internet connection issues. As well as file and system management e.g. on boarding a new member of staff.
What is the command prompt?
It allows the user the navigate the file system, launch and terminate processes, perform maintenance and automate tasks using batch files.
What is the process running inside the window for command prompt?
C:\windows\system32\cmd.exe
If you save a file on the command line on windows what does it save as?
Exe
What are the 3 advantages of the command prompt?
- When you want to quickly do something you can use the command line within the command prompt e.g. to find pictures on a computer.
- When you want to repeat certain tasks many times or at some point in the future. E.g. delete unnecessary files.
- If you want to administer a machine remotely. You can use the command line to gain control of a PC remotely.
What are the 2 disadvantages of the command prompt?
- When you don’t know the name of the command or what options to make it work, it makes it difficult to use.
- When the thing you want to automate requires user input. E.g. selecting a default printer. You cannot use it this way.
What can PowerShell be used for, and what built-in scripting language does it contain?
To automate tasks and configure operating systems such as Windows. It is based on the .NET framework.
What is the language used in PowerShell?
Commandlets
What is the file extension for a PowerShell script?
PS1
What is BASH, and what can it be used for?
It stands for Bourne Again Shell. It is based on UNIX operating systems such as Linux and Mac OS. Examples include Bash, Dash, Sh, Ksh. It can be used to manage routine tasks and file management. It is different from PowerShell/Command Prompt.
What is Linux?
It is an operating system like MAC, Windows etc. Linux is open to anyone. It allows everyone to create their own version of Windows and MAC. Therefore, there are a lot of security risks associated with it.
What is an Internal Command Prompt?
They are built into cmd.exe and do not exist as separate executable files. So when you enter a command. The interpreter tries to match what you typed into a recognised command.
What are External Command Prompts?
They are separate executable files that exist on the operating system’s storage device. It requires a separate file to operate.