- a. Shell
- b. Kernel
It is the outer layer of the UNIX operating system.
Shell reads commands, whether they are valid or not.
Shell checks if the command is used properly.
If everything is correct, the shell interprets the command into a kernel-understandable form and hands it over to the kernel.
Shell acts as an interface between the user and the kernel.
It is the core component of the UNIX operating system.
It is responsible for executing commands with the help of hardware components.
Memory allocation and process allocation are managed by the kernel.
It acts as an interface between the shell and hardware components.
To perform a big task, multiple commands may be required.
Create a new shell script file using the command:
gedit test.shMake the shell script executable with the command:
chmod u+x test.shExecute the shell script using the command:
./test.sh- Normal user:
$prompt - Super user/Root user/Admin user:
#prompt
Example session:
akshay@Ubuntu:~/Documents/DurgaSoft_Linux$ whoami
akshay
akshay@Ubuntu:~/Documents/DurgaSoft_Linux$ sudo -i
root@Ubuntu:~# whoami
root
root@Ubuntu:~# exit
logout
akshay@Ubuntu:~/Documents/DurgaSoft_Linux$sudo -i: Switch to superuserexit: Return to the normal user
pwd: Print working directoryls: List all files and directoriesmkdir: Create a directorycd: Change directorytouch: Create an empty filermdir: Remove the directoryrm: Remove a filedate: Display current date and timehelp: Display available commandsexit: Log out of the sessionclear: Clear the terminalhello: Display brief system information
- User home directory for Durga:
/home/durga - User home directory for Akshay:
/home/akshay
alias: Sets an alias for a (complex) commandapropos: Displays a short description of a commandbrowse: Opens a web page in a new browser windowcal: Displays a monthly calendarcat: Concatenates and outputs fileschmod: Changes a file's permissionscp: Copies files from source to targetecho: Writes all arguments back to the terminalman: Displays manual pages for a commandmv: Moves (renames) files from source to targetps: Displays current processesuname: Displays the system identificationvi: Visual editor (simpler version of standard UNIX vi)which: Evaluates which command will be executedweb: Opens a web page in a new browser window
For more commands, try http://masswerk.at/jsuix.