0% found this document useful (0 votes)
57 views

Linux Practical

This document provides definitions and descriptions of various commands, utilities, and concepts related to Linux and operating systems. It explains what a directory is and common Linux commands like ls, cat, rm, cp, mv, grep, sort, diff, uniq, echo, date, script, bzip2, bzcat, bunzip2, whereis, slocate, and finger. It also covers concepts such as filesystems, ordinary files, directory files, pathnames, startup files, the cd command, file types, super users, shell scripting, creating empty and new directories, Linux vs Unix, LILO, hypervisors, Linux vs Windows, the TC shell, the CLI, creating shortcuts in shell, servers,

Uploaded by

Sumit Vaswani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Linux Practical

This document provides definitions and descriptions of various commands, utilities, and concepts related to Linux and operating systems. It explains what a directory is and common Linux commands like ls, cat, rm, cp, mv, grep, sort, diff, uniq, echo, date, script, bzip2, bzcat, bunzip2, whereis, slocate, and finger. It also covers concepts such as filesystems, ordinary files, directory files, pathnames, startup files, the cd command, file types, super users, shell scripting, creating empty and new directories, Linux vs Unix, LILO, hypervisors, Linux vs Windows, the TC shell, the CLI, creating shortcuts in shell, servers,

Uploaded by

Sumit Vaswani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Directory: A directory is a resource that can hold files.

On other operating systems, like


Windows, a directory is referred to as a folder.
• ls: The ls utility lists the names of files which are available.
• cat: The cat utility displays the contents of a text file.
• rm: The rm (remove) utility deletes a file.
• cp:: The cp (copy) utility makes a copy of a file. This utility can copy any file, including
text and executable program (binary) files.
• mv: The mv (move) utility can rename a file without making a copy of it.
• grep: The grep utility searches through one or more files to see whether any contain a
specified string of characters.
• sort: The sort utility displays the contents of a file in order by lines; it does not change the
original file.
• diff: The diff (difference) utility compares two files and displays a list of the differences
between them.
• uniq: The uniq (unique) utility displays a file, skipping adjacent duplicate lines, but does
not change the original file.
• Pipe: A pipe (written as a vertical bar [|] on the command line and appearing as a solid or
broken vertical line on a keyboard) provides the simplest form of this kind of
communication.
• echo: The echo utility copies the characters you type on the command line after echo to the
screen.
• date: The date utility displays the current date and time.
• script: The script utility records all or part of a login session, including your input and the
system’s responses.
• bzip2: The bzip2 utility compresses a file by analyzing it and recoding it more efficiently.
• bzcat: The bzcat utility displays a file that has been compressed with bzip2.
• bunzip2: You can use the bunzip2 utility to restore a file that has been compressed with
bzip2.
• whereis: The whereis utility searches for files related to a utility by looking in standard
locations instead of using your search path.
• slocate: The slocate (secure locate) or locate utility searches for files on the local system.
• Finger: This utility is used to retrieve information about users on remote systems if the
local system is attached to a network.
• Filesystem: A filesystem is a set of data structures that usually resides on part of a disk and
that holds directories of files.
• Ordinary files: These are simply files, appear at the ends of paths that cannot support
other paths.
• Directory files: These are also referred to as directories or folders, are the points that other
paths can branch off from.
• Pathname: A pathname is a series of names that trace a path along branches from one file
to another.
• Startup files: These appear in your home directory, give the shell and other programs
information about you and your preferences.
• Cd utility: The cd (change directory) utility makes another directory the working directory
but does not change the contents of the working directory

Type of file and file system

In Linux, file types are determined by the file format and the file's metadata, rather than by its
extension. Some common file types in Linux include:

1. Regular file
2. Directory
3. Symbolic link (or symlink)
4. Block special file
5. Character special file
6. Named pipe
7. Socket.

2. super user
Is a root user like working as same in windows admin.

3. Shell scripting

Shell scripting is a way of writing scripts in the shell, which is a command-line interface for
interacting with the operating system. In Linux, shell scripts are used to automate tasks, such as
setting up a development environment, automating backups, and performing system
maintenance.

A shell script is a text file that contains a series of commands that are executed in order. The
script can include various shell commands, utilities, and programming constructs, such as loops,
conditional statements, and functions.

4. how to make empty file

There are several ways to create an empty file in Linux:

1. Using the touch command:

bash
touch filename

This will create a new, empty file with the specified name. If the file already exists, the touch
command will update the modification time of the file.
5. how to create directory

In Linux, you can create a new directory using the mkdir (make directory) command. The basic
syntax for creating a new directory is:

mkdir directory_name

6. Linux vs unix

Unix is a well-established, proprietary operating system designed for servers and workstations,
while Linux is a general-purpose, open-source operating system with a large community of
developers and users.

7. LILO
LILO was used to load the Linux kernel into memory and start the operating system. It was also
used to boot other operating systems, such as DOS, Windows, and BSD, by creating a boot menu
that allowed the user to choose the operating system to boot.

8. HYPERVISER
A hypervisor, also known as a virtual machine monitor, is software that enables virtualization.

9. LINUX VS WINDOWS
Linux is a Unix-like operating system that is based on the open-source model, while Windows is
a proprietary operating system developed by Microsoft.
Linux is considered to be more secure than Windows
Linux is open-source software and is typically free to download and use, while Windows requires
a license, which can be expensive, especially for the latest version of the operating system.

10. TC Shell
Tcsh provides a flexible and powerful shell environment that offers many of the advanced
features and functionality of other shells, while still maintaining the familiarity and simplicity of
the original C shell.

11. CLI(COMMAND LINE INTERFACE)


The CLI provides a more powerful and flexible way of interacting with a Linux system compared
to a graphical user interface (GUI). It is often used by system administrators and developers,
who need to perform tasks that are not possible or easier to do in a GUI environment.

12. how to create shortcut in shell


n Linux shell, you can create shortcuts or alias for commands. An alias allows you to use a short,
memorable name for a command, instead of typing the full command each time.

13. What is a server in linux?


A server in Linux refers to a computer system that provides services or resources to other
systems or devices on a network. Servers are used in many different ways, such as serving
websites, providing file storage, running applications, and more.
14. What is a web server ? (Apache server)
A web server is a software application that delivers web pages to clients over the Internet or a
local network. It receives requests from clients, typically web browsers, and returns the
requested web pages or other resources, such as images or videos.

Apache is highly configurable and can be optimized for specific performance needs. Its large
user community and extensive documentation make it a popular choice for web server
deployments.

15. What is file server?


A file server is a type of server that provides centralized storage and management of files and
data. It allows multiple users and devices to access, share, and collaborate on files over a
network, either within an organization or over the Internet.

16. What is FTP?


FTP (File Transfer Protocol) is a standard network protocol used for the transfer of files between
a client and a server over the Internet or a local network. It is used to upload and download files
from a server, such as website files, software updates, or large data sets.

17. What is the difference between open source and free software?
Open source and free software are related concepts but they are not exactly the same. Open
source refers to the license of a software that allows its source code to be freely available to the
public, enabling anyone to view, modify, or distribute the code. Free software, on the other
hand, refers to software that can be used, studied, and modified without any restrictions or
limitations and also without paying any fees. Free software also includes the freedom to
distribute and make derivatives of the software. In other words, open source is a type of
licensing that can be applied to software, while free software is a philosophy about the users'
rights to control the software they use.

18. What is LILO and GRUB? Full form of both?

LILO is an acronym for "LInux LOader" and was a boot loader for the Linux operating system.
It was used to load the Linux kernel into memory and then pass control to it.

GRUB is an acronym for "GRand Unified Bootloader" and is a more recent and widely used
boot loader for Linux. It supports booting multiple operating systems and provides a menu-
based interface for choosing which operating system to boot.

19. Command for disk partition. (fdisk) ?


The fdisk command is a command line utility used for disk partitioning in Unix and Linux
operating systems. fdisk is used to create, modify, and delete partitions on a hard disk drive.

20. What is swap partition?


A swap partition is a portion of a hard disk drive that is designated as a virtual memory area.

21. What is the command of making a new directory? (mkdir)


22. What is hosting?
Hosting refers to the service of providing server space, resources, and technical support for
websites and other applications on the Internet. In simple terms, hosting is a way for individuals or
organizations to make their websites accessible to the world via the Internet.

23. Why linux is secure?


While no operating system is completely secure, the open-source nature of Linux, combined with
its large community and security-focused development, make it a relatively secure option for users
and organizations.

24. What is the main directory in linux?


(home)

You might also like