Introduction to Linux
Introduction to Linux
Liban Bashir
Network Security Administrator/
Former SYS ADMIN
[email protected]
Introduction to Linux -
agenda
What is Linux?
The Bash shell
I/O redirection (pipes, etc.)
Navigating the file system
What is
Linux?
http://en.wikipedia.org/wiki/Darwin_%28operating_system%29
What is Linux?
Linux is a Unix* clone begun in 1991 and
written from scratch by Linus Torvalds with
assistance from a loosely-knit team of
hackers across the Net.
64% of the world’s servers run some variant
*kernel
What is Linux?
Linux + GNU Utilities = Free Unix
multitasking
tcsh
cat device grep
access
Hardware file
system
sh
Kernel awk
sort
Shell
Utilities
Linux Has Many Distributions
What is Linux?
“Small programs that do one thing well”
◦ Mac OS X
“Terminal” is already installed
Why? Darwin, the system on which Apple's Mac OS
X is built, is a derivative of 4.4BSD-Lite2 and
FreeBSD. In other words, the Mac is a Unix system!
For X11 (graphics), see XQuartz
(http://xquartz.macosforge.org/
landing/)
Connecting to a Linux Host -
Windows Client
MobaXterm
◦ From Windows Desktop
Double-click MobaXterm_Personal_6.5.exe
Double-click saved session scc1.bu.edu [SSH]
Login: <userID>
Password: <password>
Connecting to a Linux Host -
Mac OS X Client
Terminal
◦ Type ssh –X scc1.bu.edu or ssh –Y scc1.bu.edu
The Shell
A shell is a computer program that interprets the
commands you type and sends them to the operating
system. On Linux systems (and others, like DOS/Windows),
it also provides a set of built-in commands and
programming control structures, environment variables,
etc.
Most Linux systems, including BU’s Shared Computing
Cluster, support at least two shells: TCSH and BASH. The
default shell for your account is BASH. (Which is best?
Caution: flame war potential here!)
“BASH” = “Bourne-again Shell” (GNU version of ~1977 shell
written by Stephen Bourne)
Bash environment
variables
Variables are named storage locations. So-called
“environment variables” are conventionally used
by the shell to store information such as where it
should look for commands (i.e., the PATH).
Environment variables are shared with programs
that the shell runs.
To see the current value of PATH, do:
◦ echo $PATH
To see all currently defined environment variables
do:
◦ printenv
Help with Commands
Type
◦ date –-help
◦ man date
◦ info date
[And yes, you can always Google it]
For a list of BASH built-in commands, just
root directory.
Many directories have subdirectories.
Unlike Windows, with multiple drives and