Basic Command of Unix
Basic Command of Unix
: 230760107131
Practical – 1
aim: Study of Basic commands.
What is Linux/UNIX?
Linux/UNIX is operating systems (OS) that allow users to perform multiple tasks on their
computers.
It is open-source, so anyone can view, modify, and share its code. Linux can run multiple programs
at once and allow several users to work on the system simultaneously. It is secure, with features that
protect your data. Linux works on many different types of hardware and is known for being stable,
rarely crashing. You can customize it to fit your needs. It also has tools for networking and
installing/updating software easily. Plus, there’s a large community that offers support and helps
improve Linux.
Linux offers several advantages, such as being open-source and free to use, which allows users to
access and modify the source code. It is known for its strong security features, stability, and
reliability, making it ideal for servers. Linux is highly customizable to suit specific needs and
performs well even on older hardware. Additionally, it has a large, active community that provides
support and updates. However, there are also some drawbacks. Compatibility issues can arise with
certain software and hardware, and Linux may not support some proprietary programs. The learning
curve can be steep for beginners, especially when using the command-line interface. There is also
limited availability of commercial software, and installing some programs can be more complicated
compared to other operating systems. Gaming support on Linux is improving but still lags behind
Windows.
2. System Libraries: Pre-written code that applications use to perform tasks, acting as a bridge
between the kernel and applications for efficient interaction.
3. Shell: A user interface that allows users to interact with the system by entering commands,
which are executed by the kernel.
4. Hardware Layer: Includes the physical components of the computer (e.g., CPU, RAM, HDD),
enabling the operating system to function by providing necessary resources.
5. System Utilities: Essential tools for managing and configuring the system, such as installing
software, configuring networks, and monitoring performance. They simplify system administration
tasks.
1. cd :
(a) cd.. Change Current directory to parent directory
(b)ls -a List all files including hidden file starting with ‘.’
8. who It display the users that are currently logged into your Unix
computer system
(a) who -b Display the time of the last system boot
(b) who -H Print a line of column headings
(c) who -q Displays all login names, and a count of all logged-on users
(d) who -a Display all details of current logged in user
9. whoami This command prints the username associated with the current
effective user ID
(a) whoami - -help Display a help message, and exit
(b) whoami - -version Display version information, and exit
12. rmdir This command removes empty directories from your filesystem
13. cp This command is used to copy files and directories.
(a) cp -i Interactive - ask before overwrite
20. head easy to output the first part (10 lines by default) of
files
(a) head -n Print the first n lines instead of the first 10; with the leading ‘-‘,
print all but the last n lines of each file
21. tail prints the last few number of lines (10 lines by default) of a certain file, then
terminates
(a) tail -n Output the last num lines, instead of the default (10)
(b) tail -c Output the last num bytes of each file
(c) tail -q Never output headers