Operating System
(CS322)
Lab [2]
Linux View & File Management
T.A / Mohamed Hossam
FCI Minia University
Linux view
Linux OS View directory structure (FHS).
/boot /bin /sbin /lib /lib64 /home /root /usr /tmp /etc /opt
/run /proc /sys /srv /dev /cdrom /media /mnt /var
FCI Minia University 2024 © 2
Linux view
Linux OS View directory structure (FHS).
/boot Holding files used in booting the operating system.
/bin Storing all binary executables including all commands line.
/sbin Having the root-only commands used by the super user.
FCI Minia University 2024 © 3
Linux view
Linux OS View directory structure (FHS).
/lib Containing kernel modules and shared library images.
/lib64 Storing 64-bit library files.
FCI Minia University 2024 © 4
Linux view
Linux OS View directory structure (FHS).
/home Having all separate private files of users'.
/root The first directory in a hierarchy, used to linked the other branches.
/usr Using as a location for user installed programs and its files.
FCI Minia University 2024 © 5
Linux view
Linux OS View directory structure (FHS).
/tmp Having all temporary files for the running programs .
/etc Containing the configuration and setting files.
/opt Storing the installation of add-on application software packages.
FCI Minia University 2024 © 6
Linux view
Linux OS View directory structure (FHS).
/run Holding all files running in the ram.
/proc Having information about system processes and allocation resources.
/sys Storing information and configuration settings that kernel provides.
FCI Minia University 2024 © 7
Linux view
Linux OS View directory structure (FHS).
/srv Using as location of data files for a particular service, such as FTP.
/dev Containing special files for all devices.
/cdrom Using as place to the mount devices.
FCI Minia University 2024 © 8
Linux view
Linux OS View directory structure (FHS).
/media Containing subdirectories which are used for removeable media.
/mnt Using as temporary storage for the mount devices.
/var Holding the administrative and logging files.
FCI Minia University 2024 © 9
File Management
We have two ways to file management.
Command Line Interface (CLI).
Graphical User Interface (GUI)
FCI Minia University 2024 © 10
File Management
Functions control file management.
Creating & Renaming.
Browsing.
Copying.
Moving.
Deleting.
FCI Minia University 2024 © 11
File Management
Let’s launch our terminal.
User name Separator Home directory
Computer name or host name. Regular user
FCI Minia University 2024 © 12
File Management
who Current user account
Print system
uname information
FCI Minia University 2024 © 13
File Management
cal Display calendar
Print system date and
date time
FCI Minia University 2024 © 14
File Management
ifconfig configuration
network interface
top Task manager
FCI Minia University 2024 © 15
File Management
Summarize system
time resource usage
times Get process times
FCI Minia University 2024 © 16
File Management
“the display text”
echo
Display a line of text
“the print text”
printf
Format and print data
FCI Minia University 2024 © 17
File Management
On-line reference
man manuals
info Useful info
commands
Terminal commands
help
list
FCI Minia University 2024 © 18
File Management
Clear the terminal
clear screen
reset Terminal initialization
Show all commands
history exit Close Terminal
wrote in terminal
FCI Minia University 2024 © 19
File Management
pwd Print working directory
ls List directory contents
FCI Minia University 2024 © 20
File Management
New path ~ - ..
cd Change directory
File name
touch
Create new file
> >> File name
cat
Open file
FCI Minia University 2024 © 21
File Management
File name *.* New path -r Dir name New path
cp Copy file or directory
FCI Minia University 2024 © 22
File Management
File name *.* New path New name
mv dir name New path New name
Move and rename (file or directory)
FCI Minia University 2024 © 23
File Management
File name *.* -r dir name
rm remove file or directory
FCI Minia University 2024 © 24
File Management
directory name
mkdir
create directory
directory name
rmdir
remove directory
FCI Minia University 2024 © 25
FCI Minia University 2024 © 26