Os Exp 1
Os Exp 1
Experiment 1
Number
Experiment To study basic Unix commands.
Title
Resources / Hardware: Software:
Apparatus Basic Desktop with Windows or Jslinux,
Required Linux.
Objectives
(Skill Set /
Knowledge 1. To understand basic Unix commands
Tested /
Imparted)
Theory and 1. pwd:
Outputs Stands for Present Working Directory. It is a way to determine the
directory one is currently working on. To use the command, just type
pwd in the Command Prompt.
Output:
2. cd, cd .. , cd desktop :
Stands for Change Directory. It is a way to move around different
directories; cd .. changes directory to the previous of the current
directory. To use the command, just type cd followed by the desired
directory / location in the Command Prompt
Output:
3. echo :
This command returns whatever is specified within it to the terminal. To
use the command, just type echo followed by the required text in the
Command Prompt.
Output:
4. touch:
This command is used to create a file using the terminal. To use the
command, just type touch followed by the filename along with the file
extension in the Command Prompt.
Output:
6. history
This command shows the all the previous commands used in the terminal.
To use the command, just type history in the Command Prompt.
Output:
7. mkdir:
It is a simple way to create / make a directory in Linux systems. To use the
command, just type mkdir followed by the directory name in the
Command Prompt.
Output:
8. rmdir:
This command is used to remove / delete a directory. To use the
command, just type rmdir followed by the directory name in the
Command Prompt.
Output:
9. rm:
This command is used to remove any file from system. To use the
command, just type rm followed by the filename with extension in the
Command Prompt
Output:
10. rm -rf:
This command is used to remove any file from system, the -rf helps us to
delete non-empty files forcefully. To use the command, just type rm
followed by the filename with extension in the Command Prompt.
Output:
11. who:
The who command is used to get information about currently logged in
user on to system. To use the command, just type who or who followed by
the required tags in the Command Prompt.
Output:
12. whoami:
The whoami command is used to get the username of the current user. To
use the command, just type whoami in the Command Prompt
Output:
13. bc:
bc command is used for command line calculator. It is similar to basic
calculator by using which we can do basic mathematical calculations. . To
use the command, just type bc in the Command Prompt.
Output:
14. cp:
cp stands for copy .cp command is used to copy a file or a directory. To
use the command, just type cp followed by the filename to be copied and
the new filename in the Command Prompt.
Output:
15. mv
mv stands for move. mv is used to move one or more files or directories
from one location to another. To use the command, just type mv followed
by the target location and the new location in the Command Prompt.
Output:
16. date:
date command is used to display the system date and time. date
command is also used to set date and time of the system. To use the
command, just type date in the Command Prompt.
Output:
17. cal:
cal command is used when a user wants a quick view of the calendar in
the Linux terminal. To use the command, just type cal in the Command
Prompt.
Output:
18. gedit:
gedit command is used to edit text files graphically through Linux GUI. To
use the command, just type gedit followed by the filename in the
Command Prompt.
Output: