04 - LINUX Flashcards
what is opensource ?
Software with source code that anyone can inspect, modify, and enhance.
advantages of linux
- Opensource
- Community support
- Support wide variety of hardware
- Customization
- Most servers run on linux
- Automation
- Security
Architecture of linux
Hardware – kernel – shell – applications
Popular linux distros
- Ubuntu
- Mint
- Arch
- Fedora
- Debian
- OpenSUSE
Popular server linux OS
- Red Hat Enterprise linux
- Ubunu server
- Centos
- SUSE enterprise linux
Most used linux distros
- RPM based: RHEL, centos, Oracle
- Debian based: ubuntu, kali linux
what are the home directories
/root, /home/[username]
user executable
/bin, /usr/bin, /usr/local/bin
other mountpoints
/media, /mnt
configurations
/etc
Temporary files
/tmp
kernels and bootloader
/boot
server data
/var, /srv
system information
/proc, /sys
shared libraries
/lib, /usr/lib, /usr/local/lib
command to switch to root user
su -i
create file
touch filename.ext
create multiple files in number range
- Touch filename{1..10}.txt
copy file to directory
cp file dev/
relative vs absolute file path
relative: path from current directory
absolute: path from file system home directory
copy directory with contents
cp -r /dir /main
move or rename a file
mv src dest
move all text files
mv *.txt dir/
VIM editor modes
command, insert, extended
create file in vim
move cursor to first/last line
set line numbers
copy paste in vim
yy/p, P
copy number of lines
nyy
delete line
dd
undo
uu
search keyword
/search
list files with detailed information
ls -l
get file type information
file filename
different filetypes
directory, file, character file, block disk, link, socket, pipe
create link to a file
ln -s destination link_name