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

2-Linux Fundamentals

The document discusses accessing and using the Linux command line, including an introduction to Linux, logging into systems either locally or via desktop, navigating and managing files through basic commands like ls, cd, cp, and rm, and an overview of the Linux file system hierarchy and key directories like /home, /etc, and /usr. It also covers getting help in Linux using man pages and accessing the shell either as a regular user or superuser.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

2-Linux Fundamentals

The document discusses accessing and using the Linux command line, including an introduction to Linux, logging into systems either locally or via desktop, navigating and managing files through basic commands like ls, cd, cp, and rm, and an overview of the Linux file system hierarchy and key directories like /home, /etc, and /usr. It also covers getting help in Linux using man pages and accessing the shell either as a regular user or superuser.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

1

Linux Admin I
2

HELLO!
We are EC3 team
I am Wesam Bakheet
3
Agenda

✘ Introduction to linux
✘ Accessing the Command Line
✘ Managing Files From the Command Line
✘ Getting Help in Red Hat Enterprise Linux
4
Objectives

✘ Know about Linux OS


✘ Install, log into a Linux system and run simple commands
using the shell.

✘ Understand fundamental file system layout, organization,


and the location of key file types.

✘ Locate documentation and research answers about


commands using man and Info documentation.
5
Introduction to linux

✘ Open source
✘ Kernel & Shell
✘ Linux Distributions
✘ Linux Installation
6
Accessing the Command Line

Using local console Using the desktop


log into a Linux system on a log into the Linux system using
local text console and run the GNOME 3 desktop
simple commands using the environment to run commands
shell. from a shell prompt in a
terminal program.
7
Accessing the Command Line Using local console
✘ What is command line
✗ Is a text-based interface which can be used to input instructions to a
computer system.
✘ What is Bash shell
✗ The Linux command line is provided by a program called the shell.
✘ Shell basics
✗ Command to run.
✗ Options to adjust the behavior of the command.
✗ Arguments, which a re typically targets of the command.
✘ Users types In Linux
✗ Superuser (root user) and Regular user.
Shell basics 8

✘ Commands have the following syntax:


✗ [student@desktopX -]$ command Options arguments
✗ [root@desktopX -]# command Options arguments

✘ Each item is separated by a space.


✘ Options modify a command's behavior.
Shell basics 9

✘ Single-letter options usually preceded by “-” Can be passed


as -a -b -c or –abc.

✘ Full-word options usually preceded by “--” [ --help]


✘ Arguments are file names or other data needed by the
command.

✘ Multiple Commands can be separated by “;”.


✘ Example:
✗ [student@desktopX -]$ ls -l
10
Accessing the Command Line Using the desktop

✘ What is the GNOME


✘ Workspaces:
✗ Are separate desktop screens which have different
application windows.

✘ How start terminal.


✗ Select Applications > Utilities > Terminal.

✘ Powering off or rebooting the system.


11
Executing commands using bash shell

✘ Basic command syntax


✘ Examples of simple commands
✗ Date ✘ Passwd
✗ File ✘ Head & tail
✗ Wc
12
The linux file system hierarchy

✘ All files on a Linux system are stored on file system.


✘ Files and directories are organized into single-rooted
inverted tree structure.
✘ File system begins at the root directory, represented by
alone / (forward slash) character.
✘ Names are case-sensitive
✘ Paths are delimited by /
✘ Users have the own directory. (home directory)
13
The linux file system hierarchy
14
The linux file system hierarchy

✘ /root
home directory for the administrative super user, root.
✘ /home
home directories where regular users store their personal data and
configuration files.
✘ /etc
Configuration files specific to this system.
✘ /var
Variable data specific to this system that should persist between boots
15
The linux file system hierarchy

✘ /run
runtime data for processes started since the last boot
✘ /dev
contains special device files which are used by the system to access
hardware
✘ /usr
Installed software, shared libraries, include files, and static read-only
program data.
/usr/bin: User commands.
/usr/sbin: System commands
16
Locating files by name

Absolute paths relative paths


Is a fully qualified name, Specifying only the path
beginning at the root “/” necessary to reach the file from
directory and specifying each the working directory.
subdirectory traversed to
reach and uniquely represent a
single file.
17
Linux commands

✘ Navigating paths
✗ Pwd
✗ Cd
✗ Cd ..
✗ Cd -
✗ Ls -l
✗ Ls -a
✗ Ls -R
✗ Ls -l ~
18
Managing files using command-line tools
✘ ls show files in current position
✘ cd change directory
✘ cp copy file or directory
✘ mv move file or directory
✘ rm remove file or directory
✘ pwd show current position
✘ Mkdir create directory
✘ Rmdir remove directory
✘ su switch user
✘ passwd change password
19
Managing files using command-line tools

Single source Multiple source


✗ cp file1 file2 ✗ cp file1 file2 file3 dir
✗ mv file1 file2 ✗ mv file1 file2 file3 dir
✗ rm file1 ✗ rm -f file1 file2 file3
✗ mkdir dir ✗ mkdir -p par1/par2/dir
✗ cp -r dir1 dir2 ✗ cp -r dir1 dir2 dir3 dir4
✗ mv dir1 dir2 ✗ mv dir1 dir2 dir3 dir4
✗ rm -r dir1 ✗ rm -rf dir1 dir2 dir3

You might also like