Linux:
- Linux is kernel not OS
- Linux is not a UNIX derivative. It was written from scratch
- A Linux distribution is the Linux kernel and a collection of software that together creates an OS.
Linux Features:
- Open source
- Secure
- Simplified updates for all installed software
- Light weight
- Multi-User or Multi-Task
- Multiple distributions – RedHat, Debian, Fedora etc.
File System Hierarchy:
/home - home directory for other user
/root – It is home directory for root user
/boot – It contains bootable files for Linux
/etc - It contains all configurations files.
/usr – By default software are installed in this directory
/bin – It contains commands used by all users
/sbin - It contains commands used by only root user
/opt – Optional application software Packages
/dev – Essentials device files. This includes terminal devices, usb or any devices attached to the system.
Linux Commands & It’s use cases:
cat command
– The cat command is one of the most universal tools, yet all it does is Copy standard input to Standard Output.
- Vi editor -
- A programmer text editor
- It can be used to edit all kinds of plain text, it is specially useful for editing programs, mainly used for Unix programs.
Notes: :w – to save
:wq or :x – To save and quit
:q – quit
:q! – force quit, no save
Vi is a standard whereas ‘nano’ has to be available depending on the linux we use.
rmdir – This command is used to remove the specified directory (empty)
rmdir -p – Removes both the parent and child directory
rmdir -pv – Removes all the parent and sub-directories along with verbose.
rm -rf – Removes even non-empty file and directory.
Rm -rp – Removes non-empty directories including parent and sub directory.
rm -r – Removes empty directory
hostname
Ifconfig, cat /etc/os-release
yum install httpd
yum remove httpd
yum update httpd
service httpd start
service httpd status
chkconfig httpd on
chkconfig httpd off
which
whoami
echo
yum list intalled
useradd- To create user
groupadd – To create a group
gpasswd -a/-m – To add user into group, to add multiple user
ln – Hardlink/ backup
ln -s – Softlink/ short cut
tar – Tar is an archiver used to combine multiple files into one
gzip – It is a compression tool used to reduce the size of a file
wget – It is the non-intracity network downloader.
- chmod – Used to change the access mode
- chown – Change the owner of the file or directory
- chgrp – Change the group of file or directory
File Details:
Note: r = read, w = write, x = execute
- rm -rf * - To remove all file/directory in single command
Top comments (2)
Nice, content should be organized.
Nice