KEMBAR78
Linux Practicle | PDF | File System | Linux Distribution
0% found this document useful (0 votes)
11 views23 pages

Linux Practicle

Uploaded by

gerekity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

Linux Practicle

Uploaded by

gerekity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

What is Linux?

Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the
most popular platforms on the planet, Android, is powered by the Linux operating
system. An operating system is software that manages all of the hardware resources
associated with your desktop or laptop. To put it simply, the operating system
manages the communication between your software and your hardware. Without the
operating system (OS), the software wouldn’t function.

The Linux operating system comprises several different pieces:

1. Bootloader – The software that manages the boot process of your


computer. For most users, this will simply be a splash screen that pops up
and eventually goes away to boot into the operating system.
2. Kernel – This is the one piece of the whole that is actually called ‘Linux’. The
kernel is the core of the system and manages the CPU, memory, and
peripheral devices. The kernel is the lowest level of the OS.
3. Init system – This is a sub-system that bootstraps the user space and is
charged with controlling daemons. One of the most widely used init systems
is systemd, which also happens to be one of the most controversial. It is the
init system that manages the boot process, once the initial booting is handed
over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
4. Daemons – These are background services (printing, sound, scheduling,
etc.) that either start up during boot or after you log into the desktop.
5. Graphical server – This is the sub-system that displays the graphics on your
monitor. It is commonly referred to as the X server or just X.
6. Desktop environment – This is the piece that the users actually interact
with. There are many desktop environments to choose from (GNOME,
Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop
environment includes built-in applications (such as file managers,
configuration tools, web browsers, and games).
7. Applications – Desktop environments do not offer the full array of apps. Just
like Windows and macOS, Linux offers thousands upon thousands of high-
quality software titles that can be easily found and installed. Most modern
Linux distributions (more on this below) include App Store-like tools that
centralize and simplify application installation. For example, Ubuntu Linux has
the Ubuntu Software Center (a rebrand of GNOME Software) which allows you
to quickly search among the thousands of apps and install them from one
centralized location.
Distributions of Linux :
Linux has a number of different versions to suit any type of user. From new users to
hard-core users, you’ll find a “flavor” of Linux to match your needs. These versions
are called distributions (or, in the short form, “distros”). Nearly every distribution of
Linux can be downloaded for free, burned onto disk (or USB thumb drive), and
installed (on as many machines as you like).

Popular Linux distributions include:

•LINUX MINT
•MANJARO
•DEBIAN
•UBUNTU
•ANTERGOS
•SOLUS
•FEDORA
•ELEMENTARY OS
•OPENSUSE
Installing Linux :

Linux offers one of the easiest installations of all operating systems. In fact, most
versions of Linux offer what is called a Live distribution, which means you run the
operating system from either a CD/DVD or USB flash drive without making any
changes to your hard drive. You get the full functionality without having to commit to
the installation. Once you’ve tried it out, and decided you wanted to use it, you simply
double-click the “Install” icon and walk through the simple installation wizard.

Typically, the installation wizards walk you through the process with the following
steps (We’ll illustrate the installation of Ubuntu Linux):

•Preparation: Make sure your machine meets the requirements for


installation. This also may ask you if you want to install third-party software
(such as plugins for MP3 playback, video codecs, and more).
•Wireless setup (if necessary): If you are using a laptop (or machine with
wireless), you’ll need to connect to the network, in order to download third-
party software and updates.
•Hard drive allocation (Figure 4): This step allows you to select how you want
the operating system to be installed. Are you going to install Linux alongside
another operating system (called “dual booting”), use the entire hard drive,
upgrade an existing Linux installation, or install over an existing version of
Linux.
•Location: Select your location from the map.
•Keyboard layout: Select the keyboard for your system.
•User setup: Set up your username and password.

That’s it. Once the system has completed the installation, reboot and you’re ready to
go. For a more in-depth guide to installing Linux, take a look at “How to Install and
Try Linux the Absolutely Easiest and Safest Way” or download the Linux Foundation’s
PDF guide for Linux installation.
Installing software on Linux :
Just as the operating system itself is easy to install, so too are applications.
Most modern Linux distributions include what most would consider an app
store. This is a centralized location where software can be searched and
installed. Ubuntu Linux (and many other distributions) rely on GNOME
Software, Elementary OS has the AppCenter, Deepin has the Deepin Software
Center, openSUSE has their AppStore, and some distributions rely on Synaptic.
Regardless of the name, each of these tools do the same thing: a central place
to search for and install Linux software. Of course, these pieces of software
depend upon the presence of a GUI. For GUI-less servers, you will have to
depend upon the command-line interface for installation.

Let’s look at two different tools to illustrate how easy even the command line
installation can be. Our examples are for Debian-based distributions and
Fedora-based distributions. The Debian-based distros will use the apt-get tool
for installing software and Fedora-based distros will require the use of the yum
tool. Both work very similarly. We’ll illustrate using the apt-get command. Let’s
say you want to install the wget tool (which is a handy tool used to download
files from the command line). To install this using apt-get, the command would
like like this:

sudo apt-get install wget


The sudo command is added because you need super user privileges in order
to install software. Similarly, to install the same software on a Fedora-based
distribution, you would first su to the super user (literally issue the
command su and enter the root password), and issue this command:

yum install wget


That’s all there is to installing software on a Linux machine. It’s not nearly as
challenging as you might think. Still in doubt? Recall the Easy Lamp Server
Installation from earlier. With a single command:

sudo taskel
You can install a complete LAMP (Linux Apache MySQL PHP) server on either a
server or desktop distribution. It really is that easy.
Configuration :
Configuration is a bunch of loose ends I tie up, this includes:

•Copying dotfiles
•Enabling certain systemd units
•Creating symlinks

This is primarily accomplished with some ugly, but functional, shell scripts.

#!/bin/bash

if [ "$EUID" -ne 0 ]
then echo "must run as root"
exit
fi

# running commands to configure the system


printf "[main]\ndhcp=dhclient" >
/etc/NetworkManager/conf.d/dhcp-client.conf
printf "[Policy]\nAutoEnable=true" >
/etc/bluetooth/main.conf
echo "blacklist pcspkr" >
/etc/modprobe.d/nobeep.conf
systemctl enable NetworkManager
systemctl enable bluetooth
timedatectl set-ntp true

# disable annoying beep


echo "blacklist pcspkr" >>
/etc/modprobe.d/blacklist
mkinitcpio -p linux

# map vim to nvim


ln -sf /usr/bin/nvim /usr/bin/vim

# need to redo grub-mkconfig so it includes ucode


launch before initramfs
grub-mkconfig -o /boot/grub/grub.cfg

localectl set-locale LANG=en_US.UTF-8

cp -r ../scripts/usr/local/bin/bye /usr/local/bin/
cp -r ../scripts/usr/local/bin/importc
/usr/local/bin/
Linux Terminal :
The Linux terminal is also known as command-line, console, or shell. It is a text interface
for our Computer. We can interpret the commands and also write our scripts with this
system program.

We can manually execute commands by typing in the terminal with the Linux command
line. We can also automate commands with the use of Shell Scripts.

The Shell :
The shell can be defined as an interface of a command-line that interprets the script files
and commands of a user in the Linux system and tells the operating system of the server
how to act with them. Several shells are available that are extensively used like C
shell (cash) and Bourne shell (sh).

All the shells have their set of features and intricacies related to how commands can be
interpreted, but these shells feature output and input redirection, condition-testing,
variables, among other things.

Usually, the Bourne-Again shell is known as bash. It is a default shell for almost all the
distributions of Linux including RedHat, CentOS, and Ubuntu.

cat Command :
Cat(concatenate) command is very frequently used in Linux. It reads data from the file and
gives their content as output. It helps us to create, view, concatenate files. So let us see
some frequently used cat commands.

Command:

$cat filename
Output :

It will show content of given filename


ls command :
The ls command is used to view the contents of a directory. By default, this command
will display the contents of your current working directory.
If you want to see the content of other directories, type ls and then the directory’s
path. For example, enter ls/home/username/Documents to view the content
of Documents.

cd command :
cd command in linux known as change directory command. It is used to change current
working directory.
Syntax:
$ cd [directory]

date command :

date command is used to display the system date and time. date command is also used
to set date and time of the system. By default the date command displays the date in
the time zone on which unix/linux operating system is configured.You must be the
super-user (root) to change the date and time.

Syntax:

date [OPTION]... [+FORMAT]


date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

cal command :
cal command is a calendar command in Linux which is used to see the calendar of a
specific month or a whole year.
Syntax:
cal [ [ month ] year]
man command :
man command in Linux is used to display the user manual of any command that we can run
on the terminal. It provides a detailed view of the command which includes NAME,
SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES,
VERSIONS, EXAMPLES, AUTHORS and SEE ALSO.

Syntax :
$ man [COMMAND NAME]

echo command :
echo command in linux is used to display line of text/string that are passed as an argument .
This is a built in command that is mostly used in shell scripts and batch files to output status
text to the screen or a file.
Syntax :
echo [string]

pwd command :
pwd stands for Print Working Directory. It prints the path of the working directory, starting
from the root.

mkdir command :
mkdir command in Linux allows the user to create directories (also referred to as folders in
some operating systems ). This command can create multiple directories at once as well
as set the permissions for the directories. It is important to note that the user executing this
command must have enough permissions to create a directory in the parent directory, or
he/she may receive a ‘permission denied’ error.

Syntax:
mkdir [options...] [directories ...]
rm command :
rm stands for remove here. rm command is used to remove objects such as files, directories,
symbolic links and so on from the file system like UNIX. To be more precise, rm removes
references to objects from the filesystem, where those objects might have had multiple
references (for example, a file with two different names). By default, it does not remove
directories.
This command normally works silently and you should be very careful while
running rm command because once you delete the files then you are not able to recover the
contents of files and directories.

Syntax:
rm [OPTION]... FILE...

rmdir command :

rmdir command is used remove empty directories from the filesystem in Linux. The rmdir
command removes each and every directory specified in the command line only if these
directories are empty. So if the specified directory has some directories or files in it then this
cannot be removed by rmdir command.

Ps command :

As we all know Linux is a multitasking and multi-user systems. So, it allows multiple
processes to operate simultaneously without interfering with each other. Process is one of
the important fundamental concept of the Linux OS. A process is an executing instance of a
program and carry out different tasks within the operating system.
Linux provides us a utility called ps for viewing information related with the processes on a
system which stands as abbreviation for “Process Status”. ps command is used to list the
currently running processes and their PIDs along with some other information depends on
different options. It reads the process information from the virtual files in /proc file-
system. /proc contains virtual files, this is the reason it’s referred as a virtual file system.
ps provides numerous options for manipulating the output according to our need.

Syntax –
ps [options]
Create a New User in Windows 10 :

Step 1: Go to the Start menu and click the Settings icon in lower left corner.

Step 2: Now in the settings window, click on the Accounts icon.

Step 3: In the right menu of the window click Family & other users.
Step 4: Now click on Add someone else to this PC.

Step 5: If you don’t have the sign info of new user then proceed on clicking I don’t have
this person’s sign-in information. And then click on Add a user without Microsoft account.

Step 6: Enter all the info of the new user and click on Next.
Step 7: Now your new user account is listed below Add someone else to this PC and you
are done.

In small :

1.Select Start > Settings > Accounts and then select Family & other users. (In some
versions of Windows you'll see Other users.)

2.Select Add someone else to this PC.

3.Select I don't have this person's sign-in information, and on the next page, select Add a
user without a Microsoft account.

4.Enter a user name, password, or password hint—or choose security questions—and then
select Next.

Change a local user account to an administrator account :

1.Select Start >Settings > Accounts .

2.Under Family & other users, select the account owner name (you should see "Local
Account" below the name), then select Change account type.

3.Under Account type, select Administrator, and then select OK.

4.Sign in with the new administrator account.


Path of User personal files/folders in window 10 :
C:\Users\Adarsh Tiwari

Adding and changing passwords in window 10 :


Select Start > Settings > Accounts > Sign-in options . Under Password , select Change and
follow the directions.

Difference between Domain and Workgroup :

S.NO. Domain Workgroup


The computers in a domain have a centralized The computers in workgroup mainly has
1.
database. its own local database.
A Workgroup is used to share less secure
A domain is mainly to transfer and share
2. and personal data only due to less
sensitive and important data only.
security.
A workgroup is mainly preferred for
A domain is mainly preferred for large public
3. small local area networks like schools,
and business networks.
colleges, buildings, etc.
A domain is used to transfer and share A workgroup is used to share personal
4.
sensitive and important data due to security. data as it is less secure.
A domain can work better for large numbers A workgroup works better for fewer
5.
of devices. computers.
In workgroup there is no dependencies
The domain names are provided by domain
6. on any hardware components and server
controller on the basis of IP address.
for assigning the name.
Data recovery is not possible in a
Data can be recovered in a domain from the
7. workgroup due to the local storage of
centralized storage.
each device.
A Domain can be formed using the devices of
The devices of the same network can
8. one or more different networks domain and
only be added to a workgroup.
adding all the intended devices to it.

Process Managment in window :


The fundamental Windows process management function is CreateProcess, which creates a
process with a single thread. Specify the name of an executable program file as part of the
CreateProcess call. It is common to speak of parent and child processes, but Windows does
not actually maintain these relationships.
Task Management in window :
Press Ctrl+Shift+Esc to open the Task Manager with a keyboard shortcut or right-click the
Windows taskbar and select “Task Manager.”

Disc Management :

Right-click the Windows icon, then click Disk Management.


NTFS File System :
NTFS stands for New Technology File System is a proprietary file system developed by
Microsoft, started with the Windows NT 3.1 and many other such as Windows 2000,
including Windows XP, Windows Server 2003, Windows 7, Windows 8. NTFS file system
has many technical benefits over FAT (File Allocation Table ) an improved version and
HPFS (High Performance File System) an improved support for metadata.

Characteristics of NTFS :

1.Compatibility –
It supports compression of files and directories to optimize storage space.
2.Scalability –
It introduced with improved performance, scalable in comparison to its precursor.
3.Efficiency –
It utilizes the disk space efficiently by using smaller size of clusters.
4.Attributes –
NTFS’s attributes Read-only, hidden, system, archive, not content indexed, off-line,
temporary, compressed.

Advantages of NTFS :

•Easily recovers file system and supports long file names.


•Provides users with local security by protecting files and directories.
•NTFS is a journaling file system.
•It supports spanning volumes spread across several physical drives.
•Support larger sized hard drives with increasing general performance of the drive .

Disadvantages of NTFS :

•NTFS performance does not decrease as FAT does.


•Removable devices such as Android smart phones, do not support NTFS.
•Doesn’t include a system that guarantee file system performance.
FAT (File Allocation Table):
FAT stands for File Allocation Table and this is called so because it allocates different file
and folders using tables. This was originally designed to handle small file systems and
disks. This system majorly has three variant FAT12, FAT16 and FAT32 which were
introduced in 1980, 1984 and 1996 respectively.

Advantages:
1. The boot sector is automatically backed up at a specified location on the volume, so
FAT32 volumes are less susceptible to single points of failure than FAT16 volumes.

2. FAT32 is best for cross-compatibility with other platforms. FAT32 is more robust. FAT32
also reduces the resources necessary for the computer to operate.

3. FAT32 uses small clusters, so it allocates disk space more efficiently than FAT16.
Depending on the size of your files, FAT32 creates the potential for tens and even hundreds
of megabytes of additional free disk space on larger volumes compared to FAT16.

4. The root folder of the FAT32 drive is an ordinary cluster chain and can be located
anywhere on the volume. For this reason, FAT32 does not restrict the number of entries in
the root folder.

5. FAT32 can automatically use the backup copy of the file allocation table instead of the
default copy(with FAT16, only a disk repair tool such as Chkdsk can implement backup.

Disadvantages :

1. More than one identical copy of FAT is maintained for protection.


2. There is no built-in file system security or compression scheme with FAT32.

3. The largest FAT32 volume that windows 2000 can format is 32GB.

4. FAT32 volumes are not directly accessible from an operating system other than windows
95 OSR2 and windows98.
Ipconfig :

Displays all current TCP/IP network configuration values and refreshes Dynamic Host
Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without
parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet
mask, and default gateway for all adapters.

ipconfig/all

Output :
ping :

ping google.com

Output :

tracert :

tracert google.com

Output :
route :

route is a command used to view and manipulate the IP routing table.

Route print

Output :
hostname :

Displays name of computer

Output :

net :

The net use command is a Command Prompt command used to connect to, remove, and
configure connections to shared resources, like mapped drives and network printers.

Output :
whoami :

The computer name or domain followed by the username is displayed.

Output :

Control Panal :

The Control Panel in Microsoft Windows enables a user to change various computer
hardware and software features. Settings for the mouse, display, sound, network,
and keyboard represent a few examples of what may be modified in the Control Panel.

Sections of the Windows Control Panel :

There are eight main areas on the Control Panel, containing different tools designed to
optimize your computer.
•System and Security - A section to check your computer's status, backup and restore, and
others.
•Network and Internet - View network status.
•Hardware and Sound - View which devices are on your computer and add devices.
•Programs - Uninstall programs.
•User Accounts - Change user accessibility.
•Appearance and Personalization - Change desktop options, like fonts and screen readers.
•Clock and Region - Change date and time.
•Ease of access - Optimize your display settings.
The evolution of the Windows Control Panel :

Computer Management :

Computer Management is a handy console included in Windows that allows you to view
event logs, partition your hard drive, manage the devices and services, etc.

Click the Start button, select All Programs -> Windows Administrative Tools, and then
click on the Computer Management shortcut.

You might also like