sem 2 Flashcards
why use Linux OS systems?
it is widely used in servers and embedded devices such as LAN, wifi-networks.
what is a linux distribution?
A Linux Distribution is an OS that is based of the Linux Kernel, and it comes with a software collection.
some distributions of Linux are Redhat, Ubuntu..
what are the characteristics of Linux?
- they are powerful and can be changed easily.
- they have a modular architecture, and the modules can be stackable
- open-sourced.
cd desktop
mkdir newfolder
a new folder named “new folder” is created under desktop directory.
cd desktop
mkdir newfolder{1…100}
creates 100 files named “newfolder1” till “newfolder100”
cd desktop
rmdir newfolder{1…100}
removes the 100 folders made
pwd
shows the directory we are currently in
nano newfile1.txt
OR
gedit newfile1.txt
can insert info inside the newfile1
txt tells us it is a text file.
ps -e
shows all the processes running in the system monitor
ps -e | grep firefox
helps us to see the program running in firefox
free
shows the amount of physical and virtual memory
df
shows the amount of memory free, amount of used space of each file system.
df -Th
tells us the amount of memory used or left in gigabytes, which is human readable.
df -T
tells us the file system types
3 desirable properties of files
- long-term existence
- organised into hierarchical structure
- shareable between processes
2 ways
- launch firefox and email it to yourself
- copy file and put it in the shared folder
absolute path vs relative path
touch command
to create a file (like to include within a script)
echo “a new line”»_space; abc.txt
“a new line” will be inside the file
cat abc.txt
’ a new line ‘ is the result
cp abc.txt def.txt
abc.txt is the name of the file u want to duplicate (source)
def.txt is the name of the new duplicated file (destination)
rm def.txt
deletes the file and it is unrecoverable.
shell script
3 File allocation methods
- contiguous allocation
- chained allocation
- indexed allocation
bash script
!/bin/bash
chmod
shell script act 6