Sunteți pe pagina 1din 18

Linux

Fundamentals
Linux : Intro and Distros
 Linux is an umbrella term for group of free and open source operating systems and is not an OS
itself, but it is the kernel. GNU Linux is the OS and it comes in several hundred flavours like
Debian, Ubuntu etc.
 History: In '70s and '80s, UNIX was the main OS and it was command line based,
with no graphical interface
 Unix costed thousands of dollars
 1991, Linus Torvalds from University of Helsinki started his project to develop his
own operating system which eventually became linux kernel. He wrote unix
from scratch, rest is history.
 The beauty of linux is it's free, not only in term of cost but also the freedom to
inspect, modify and enhance it's source code

 Distros:

All of world’s top 500 supercomputers, every major space


programme and most of the internet runs on Linux. With
20,323,370+ lines of code in the Linux kernel, it remains the
single largest open source project on the planet.
Some Facts

 More than 3400 Commands


 As per DistroWatch there are
more than 792 Linux distributions
 There is some version of linux in
 Airplanes, Routers,TVs,
 Infra behind Google search
 Websites
 Smart Phones
 Tablets
 Windows data recovery disks
 Appliances
 Self driven Cars
.
Linux Boot Process
 Hardware boot
 Bootloader
 Kernel
 init/systemd
 login screen
Shells : your
interface to the O/S

Bash Shell
 Bourne Again Shell and it is the
default shell on many Linux
distributions
 Command line editing
 Job Control
 Unlimited size command history
 Shell Functions and Aliases
 Unlimited size Indexed arrays
 Integer arithmetic in any base from
two to sixty-four
Accessing Linux (ssh, terminal console)

 Putty
 SecureCRT
 SSH from linux to Linux
Important things to remember
Linux Filesystem
 O/S store data on disk
drives using a
structure called
filesystem, consisting
of files,directoris and
information needed
to access and locate
them.
 E.g. ext3, ext4,XFS,
NTFS,FAT etc.
 It is hierarchial.
Filesystem Explained
Linux commands structure
 Commands
 Flag
 Option
 Argument
Navigating linux Filesystem
Basic Commands
Command Details Flag Details

who This will display information about who is logged ls -a LiSt All – This will list all of the files in the directory including the hidden dot files.
on, both yourself and others.

ls -l LiSt Long – This will list all the files and/or subdirectories with detailed information
whoami This will display information about the current such as file size, date modified etc.
user i.e. You!
ls ls is short hand for LiSt. It will display all the
visible files within the directory that you are ls -t LiSt Time – This will sort the list into a chronological order based on modification
currently in. The files will be listed alphabetically time.
by default but this can be altered with flags.
ls -tu This list will list them chronologically based on the last access date.

pwd This will Print the Working Directory. A fancy way ls -R This list will include the content of subdirectories.
of asking the computer to display information
about where you are and what directory you are
ls –S LiSt Size – This list will be based on the size order.
currently working in.

apropos Keyword This command followed by a keyword will ls –h LiSt Human – this will make the list human readable format for example the size
provide you with information on commands that would be 1.0MB instead of 1004638
are related to that keyword.

man Command This will provide you with the manual for the ls -r LiSt Reversed – This will list the files in a reverse alphabetical order.
given command.
Directory listing attributes
Creating Files and directories

echo – using echo with > operator to create files


Linux file types
Finding files and directories

 Find
 Locate

 Grep
 Whereis
 Which

S-ar putea să vă placă și