- Linux Philosophy and Concept
- Man help and info
- Login and sudo
- Command-line Operations
- Text Editor
- User Environment
- Text Operations
- File Operations
We use Operating Systems which is mainly used to interact with different components or make use of the networking . Some say Linux is a complete OS. Others say it’s only a kernel.
Kernel is the 1st program loaded to the memory. It stays in the memory till we reboot or shutdown and there will only be one kernel at a time. Kernel is used to manage all the resources.
Shell is the program that interacts with users. There can be more than one shell in an OS. Redhat Linux, Ubuntu Linux, Centos Linux etc
BASH Shell is the default shell in Centos. It is an interface between user and kernel. Bash is one of the advanced versions among different shells.
Now we have GUI. But if you are learning linux don’t go for GUI. Use the shell to interact with Linux.
- Linux is a case sensitive OS.
- Everything in Linux is a file. We make changes in File.
- It is a modular OS, which means you can load modules or unload modules.
Three types of users :
- Normal User
- Super or Root User
- System User
Everything in linux is mapped with numbers. ID 1- 999 is reserved for system users. User with ID ‘0’ is Super User. Normal users id starts above 1000. There is by default only one root account, in case we need a user to permanently act like a root user, we can do that by assigning uid 0 to that particular user. Inbuilt text editors like vim/vi are used as default text editors.
Vim tutor – For understanding about vim.
7 Types of Files
- Directory – The ls command is used to list the names of files and directories.
- Normal Files – ‘-’
- Link Files – Hard link and Soft link
- Character File
- Block File
- S File – Sococket File
- P File -Pipe Files
How to get/take help ?
(As of now we are getting help for ls)
1. Help cmd : ls –help
2. Man cmd : man ls (manual pages) man man will tell you how to use man cmd
3. Info Pages
Who is the owner of File?
Suppose we create a file. It is accessible to 3 people
The command to change permission is chmod
Basically each file have 3 permissions
● Read – You can read the file
● Write – You can write/modify the file
● Execute – You can run the file as a script
Directory is also a file. A execute permission to directory means we can enter into directory. If no execute permission we can’t ‘cd’ into it.
We can change permissions using +,-.= these symbols. You can add permission, remove permission, assign permission.
● Add Permission can be done by ‘+’ symbol
● Remove Permission can be done by ‘-’ symbol
● Assign Permission can be done by ‘=’ symbol
Eg: To give write permission to owner – u+w space filename
We can use touch cmd to create a file. But it’s real purpose is to update the timestamp.
umask cmd – Setting of default permission
ls – l shows all the permissions. By default there is 1 owner for a file.
Stripe Down versions of Linux.
OpenWRT in the Router
D2H Box contains