Experiment No
Experiment No
passwd :
This command allows you to change your login password. You are prompted to enter your
current
cd
This command, as in DOS, changes directories. Example: cd maindir to move into the
maindir directory, cd ..to move to the directory above, or cd ~ to move to your root
directory.
pwd
This command tells you which directory you are currently working in.
ls
This gives you a listing of all files in a directory. You can't tell which are files and
which are directories.
mv
The "move" command is how you rename files. Example:
mv oldfile.txt newfile.txt
cp
Allows you to copy one or more files. Example: cp myfile.c backup.c
rm
Deletes a file. Example: rm janfiles.*
cat
Sends the contents of a file to stdout (usually the display screen). Example: cat index.html
more
Like cat but displays a file one page at a time. Example: more long_file.txt
wc
Counts the number of lines, words, and characters in a file. Example: wc essay.rtf
tail -n
Displays the last n lines of a file. Example: tail -5 myfile
head -n
Displays the first n lines of a file. Example: head -5 myfile
mkdir
Creates a new directory, located below the present directory. (Use pwd first to check where
you are!)
rmdir
Deletes a directory. Example: rmdir old_dir
man
The most important Unix command! It displays the manual pages for a chosen Unix
command. Example:
man ls
man -k
Displays all Unix commands related to a given keyword. Example: man -k date will list all
Unix commands
date
Shows the current time and date.
Conclusion :
The study of basic UNIX commands focuses on the differences between Linux and
Unix operating systems. Linux is a portable operating system that can be executed
on different hard drives, while Unix is mainly used in server systems, mainframes,
and high-end computers. Linux is developed by an active Linux Community
worldwide, while Unix is developed by AT&T Developers.
Questions:
1. Explain the difference between Linux and Unix ?
The Source Code of Linux is freely available The Source Code of Unix is not available for
to its Users. the general public.
Linux is mainly used in Home Based PC, Unix is mainly used in Server Systems,
Mobile Phones, Desktops, etc. Mainframes and High End Computers.
Different Versions of Linux are: Ubuntu, Different Versions of Unix are: AIS, HP-UX,
Debian, OpenSuse, Redhat, Solaris, etc. BSD, Iris, etc.
Examples of Unix OS :
● AIX (IBM AIX):- AIX is IBM's proprietary Unix operating system for
their Power Systems architecture.
● Solaris (Oracle Solaris):- Solaris is a Unix operating system originally
developed by Sun Microsystems, now owned by Oracle.
● HP-UX (Hewlett Packard Unix):- HP-UX is Hewlett Packard's Unix
operating system for their HP 9000 series of servers.