5. Introduction to Linux (pwd, mount point, cd,, ls, mkdir, touch) - Agnivo102/Database_Architect GitHub Wiki
Linux is reliable, flexible (with kernels [the layer between OS and application], we can change it as we wish which we can't do in windows) which makes it reliable with virus and hacking protection, its fast and over all that its free. So 99% of servers in industry is in Linux.
Linux is case sensetive
To know my home location: pwd
Mount point:- Partition is called mount point in linux (drives in windows)
df -h: To see mount point.
To go in backward location in folder (directory) in Linux : cd .. (cd is change directory)
cd / - To go to root mount point or root node.
cd home/agnivo:- Return me to my home directory
OR
cd: - Return to home directory
ls: -List of files
ls -l : List of large files
Notice the Large list properly. If the first character is d then its a directory, if its any other character then it is a file.
There are 3 sets of permissions in linux. rwx: r is read, w is write and x is exexute.
We can also notice the number after permissions is 1 then its is a file, if its greater than 1 then its a directory. If the number is 2 then its a directory. If it is 3 this means this directory has got one sub directory.
agnivo is the name of the owner of this file or directory. sha is the group name. In linux there can be multiple users like in windown. But in linux every user must be under a user-group. Like in an organization every employee has a department. 8 is the size of the file. 8 bytes. Nov 8 9:32 is the date and time of the last modified time of the file or directory. 1st_directory is the name of the file or directory.
ls -p: append / after the name if its a directory
ls -a: To know the hidden files and directories. The ones with . s are the hidden ones.
ls -al:
ls -tl: To sort time wise
ls -rtl: To sort time wise reverse
mkdir d001 :- mkdir(make directory) create a directory
Linux is case sensitive. So both u001 and U001 got taken.
mkdir u001/sha: Create a sub directory inside directory u001.
mkdir voo1/sha: -
This directory v001 doesn't exist. So system thought the name of the directory is 'voo1/sha' and we cannot use '/' inside a name. To specify to system that this is a path: