Explain what the Unix shell is.
The Unix shell is an interface between the user and the computer that uses a textual command line.
You can type commands to execute tasks. IE: manipulating directories, files, and programs.
Explain why the Unix shell is important.
The Unix shell is important/useful because it is interactive and scriptable, meaning the textual commands can also be used in a script file to automate repetitive tasks, thereby increasing productivity.
Use the Unix shell to manipulate your laptop's operating system.
* Installed HTOP to view computer performance and usage.
* Wasted precious space on my drive by installing and running fortune and cowsay
* Created a BASH script that collects name and age data and writes it to a .json file.
* Used the Unix shell to change permission on a file, allowing execution permissions to the user.
CLI Assessment
You should know the following:
Why do we use a CLI?
* Once mastered, the CLI can be must faster than a program user interface
What is the difference between shell and terminal?
* The shell is the 'language', the terminal is the 'interface'
What are flags?
* Flags specify options for command line commands (-l, -a,)
What are file permissions and why do they exist?
* Permissions exist to provide different functionality to different users. Read, write, and execution of files can be set.
Explain and be able to use the following shell commands:
- cd
use cd + directory name/path to change directory
- touch
use touch + filename to create a new file
- ls
ls lists the files in the current directory
- pwd
pwd prints the working directory for your shell session
- mkdir
mkdir + filename creates a new sub-directory under your current working directory
- rm
use rm + filename to remove a file
- sudo
use sudo before certain package installations to access admin privileges.
- cat
cat + filename displays the content of the file. cat >> filename allows you to ammend the file.