The first lesson: on Linux storage and file system.
Windows operating system and Linux system in terms of file system System files in Windows are often or always on a disk c in Linux, it keeps its name root meaning de files of the operating system
Keep system files are an operating system and their content varies from one system to another according to the system environment, for example in Windows, the file of the installed programs is in Linux, you will find the installed packages or tools in separate paths according to the file type or its installation path, often it remains in the usr, you will find the bin files where you will find the installed programs and you will find It has extensions in other paths, according to the performance program. In order to understand the system files, you need to keep the Linux and Windows operating system learner, especially if you are not a beginner in Linux, so you know your head from your leg. We have known how the system files regarding system files in Linux will remain, I have a complete publication. I just explain the No..
In terms of types of storage for system files
2 types in Windows NTFS Fate32
The difference between them in speed and the best storage capacity, of course, ntfs in windows
As for fate, it is outdated, often used to format a hard disk
Linux ext2 and ext 3 and ext4
The best ext4 for storing data ext2 is the default for some distributions such as Fedora, Red Hat and other distributions.
As for the Partition, you can divide them in Windows as normal. As for Linux, you choose the type of storage as mentioned above and choose the space. Of course in installation, the installation methods differ in Linux.
I mean, the first thing is to reserve a space for the root, the second thing is to reserve a space for home, if you want them all in one regular party, but if you are a basic system that keeps each one alone because your work is not lost after this you choose a need called swap which is an important task simply is a fake ram reserve if you have completely consumed and after Install the system
This will explain more for you if you have heard the methods of installing Linux.
The second lesson: on the structure of Linux operating system files.
File system in linux
Hierarchy of system files within the Linux system
The hierarchy of the Linux system files differs from one distribution to another, but a slight difference and also differs from Windows. If you open the disk of the copy on your computer, things will be completely clear, but in Linux it uses a hierarchical or tree form.
I mean, the shape of the tree root tree is a folder called root and it is denoted in the system by / under this root. All system files are branched. Imagine in your mind a tree that has branches and leaves.
This was a simple definition of the files that are inside the Linux system, in terms of the system, which is and what is its mission?
The first time you open the file system that is in Windows, the disk on which the copy is installed.
You will find folders
/ What we said is root or root
bin – a folder in which binary texts mean 0101 to help the system it is taking off, I mean the system software for the system and the system commands you use
boot – It is clear from his name, which contains the random memory and the system boot, and the two most important files in it
Their name is menu.lst and /boot/grub/grub.conf
Countries with takeoff settings
/ boot / vmlinuz This remains the Linux kernel
dev- It contains everything from hardware parts and parts that Linux kernel deals with
etc – Beware of tampering with this folder because it contains all the system settings completely and contains scripts, each of which performs a service upon boot
In this folder, there are several important files. Here are the most important files that you will deal with together. A file named source.list The file contains the links to the warehouses through which you will work, and it has been displayed as a store that deals with it.
A file named passwd contains all the information of the jewers and the id number in any group and the shell system that uses it and a file named gshadow in it all the information about the groups that you have
Home folder is known, of course, every user has a home folder that contains his files
Lost-find folder
If there is any damage to the system, you will find the folder that contains files if it is not repaired, it will remain empty
The media folder contains the hard drives, such as the hard disk, the USB, and everything that can be stored in it and the CD
The mnt folder contains removable devices such as USB etc.
The opt folder contains the software that is optionally installed on your system
The proc folder is important files that deal with both the Linux kernel and readable files to give you how to work together with the kernel
The sbin folder contains important software that is used to root or root
The usr folder is a large folder for the average user, and it contains the installed software, and it contains many folders local and bin and lib
Var folder The most important thing in it is var-log, which is very important to know the registration inside the system, such as logging in. It is a variable periodically, meaning any change in the system database that changes in the path, such as e-mail or databases, such as a change in size
The most important file in it is / log / messages
I finished explaining the system files in a simple and easy way
Lesson 3: Installing software on Linux.
You are bored while running on Linux because of the many problems installing programs or tools, ok:
Here is a semi-detailed or almost complete explanation of the installation of programs in Linux by command line
You will complete our trip in Linux, which is installing programs in Linux, and knowing the software formats and their types, and how we can install or install them on Linux.
The first thing is types or formats of programs in Linux
You have source code and binary code and self installing binaries and package file
The first thing is the source code
source code and binary file are the same
But the difference is that the source code is a code written in a highly programming program that you can get and modify it and keep other files with it and to install it you need to do a conversion to a binary file so that it keeps the file of my execution completely and it remains compressed because its files are not exposed to loss
Compressed with zip compression software, tar tool for unzipping and ziping archive files
If you have a tar.gz extension
Keep the file unzipping with the command
Go through tar -zxvf + file name
In other tools for decompression and decompression, each command is according to every tool you can search on the internet and see
The site offers you orders for push and release depending on the archive extension
https://continow.blogspot.com/…/tar-targz-gz-zip-rar-bz2-ta…
So, we used to click OK, so many files will appear for you, of course, you do not know where to install the tool because the files are almost non-executable, you will have to convert it to a code binary, so you can keep executables, you don’t worry, it’s easy
Within the path of the file that we decompressed, we would write these commands
./ configure
make
sudo make install
This program installed successfully, unless the program does not require libraries for you
Libraries are files or programs that perform a certain task, such as dll files in Windows. If you run a game like this, you need a Dell file to download it, so the game will run.
These libraries exist in multiple paths
costume
/ lib
/ usr / lib
usr / local / lib
opt / lib /
Conclusion The source code is written in a programmatic language, I mean, it is possible to modify it in order to install the program. If the program needed libraries to carry it and put it in a path from countries and concentrated in issuing the library.
This is the first time the second type remains
Is a binary file
It is a binary code, I mean, it is a conversion from a programming language in the first place, I mean, it is a device transformer, it is not useful to modify it because it is a ready-made variable
The extension is known as packettracer.bin, for example
This is an executable file, but in order to implement it, I have to give it implementation powers from the command
chmod + x file name
or
chmod +777 file name
Two states give the implementation permit
After that, you implement it with the following command
sudo ./packettracer.bin
Sudo note means super user, you are the root, and of course the root is the one that can give the authorities and install programs on the system, which is a feature of Linux features
But every time you will need to run the program, you must work like this in programs that install yourself by running a binary code in a specific extension, according to its programming, by making you implement it with one command. Just write the name of the program.
The third type is package file
This is considered the most famous of them
This extension has deb means Debian in the rmp extension means Red Hat every distribution has its own programs and an extension for it Debian is based on Ubuntu so you find packages that use Deb deb ok is it possible if I have a package from a second distribution I convert it so that it focuses on my distribution?
The answer, uh, is useful through the alien program, can it transfer you a red hat package or another distribution for the distribution that you are using?
You have a deb package extension package, so you want to install it
You have two things dpkg -i or apt-get update
These packages depend on sources or warehouses, for example, you download the package from the Internet using the command dbkg -i + package file.deb. If the package does not have you, but you do not know its name, or you do not, it will not differentiate in the normal case.
apt-get install package name
You will see the program in the repositories. If it exists, you will download it, it does not exist, it will give you an error
What is the difference between apt-get update and dpkg?
Just my friend
If you use dpkg to download a program, for example, if the program needs libraries or another program that means reliability, its name is reliability, or a link that tells you it is like this barang or library, so I can install like a tree system
Ok, apt-get
Completely opposite if the program needs other resources, it will download it from itself and update it also, and the latest version, if any
Ok, but we still said that dpkg does not install dependencies. Ok, if I want to put it in a normal program named Gdebi
This will simply send you the package with dependencies
Important note, for example, when installing the program with dpkg
It is best to write this matter
sudo apt-get install -f
Because his inauguration with dpkg, for example, the package requested reliability, it is possible to drop the package without preparation. Some files may be broken, so what I said above
sudo apt-get install -f fixes broken packages
We got rid of the inauguration
Negi left to delete
dpkg -i = install to install the package
dpkg -r = remove deletes the package but only the configuration files searches if you installed the program again you do not need to reset again
dpkg -P = Finds everything from the package to the configuration file
After -p or -i or -r, the package file, if it is deleted, keeps the package name sufficiency according to what you have installed. The name that appears after the installation
Note: Is it possible for the program that you will delete this to be linked to other programs during the deletion? You will say these programs may be linked to another, and so a tree remains.
Examples remain to make it easier for you to pack
But note that you have a package manager and a graphical destination where you can install programs, delete and everything, package manager
You have a package named
abiword-gnome_2.2.2-1ubuntu2.2_i386.deb
Let’s set it up with the two things dpkg and apt-get
dpkg -i abiword-gnome_2.2.2-1ubuntu2.2_i386.deb
If you request dependencies and other resources, keep using the second command or program that you said above
To delete it
dpkg -r or -p (to remove eveything) abiword-gnome_2.2.2-1ubuntu2.2_i386.deb
Put it in apt-get
Here, we will need the name of the tool or program, but we will search for it in the repositories.
apt-get install abiword-gnome
The package will be downloaded completely, including dependencies
For deletion left
sudo apt-get remove abiword-gnome
Just set up the settings file to delete everything
sudo apt-get remove -purge abiword-gnome
She will delete everything
- Apt-get Vs dpkg summary
If you want to kill someone, what will you do?
The first thing possible is a thugs dealer. Ok, you are not aware of thugs. You will see someone who knows thugs like this. To some extent, you reach them and kill the person. This remains the dpkg system. Install a second tool that needs dependencies, and you will prefer to fulfill his needs until his needs are completed and confirmed.
There is no need, I do not want thugs because I am already thuggish, I killed him myself, so the difference is apt-get erased
I need the name of the tool in me.
#is over
Lesson 4: Summoning a dictionary of any tool and components of its command book or its structure …
Linux help.
In this publication, we will talk about the commands that help us to understand the system commands.
Example ..
We have something we don’t know how it works or how it works and how we use it.
In this case we will know what this is or what is his job in order to be aware of as usefulness.
We will use whatis command
Like …. Whatis ls – what is cd
Here, it will show you the action briefly.
After I understood what he was doing, what Negi had to do with how we deal with him.
Before I tell you how to deal with it, you must know the shape of the commands or enter the commands in the system of their composition.
Command + option + argument
What does this mean?
The command field is the command that you would execute, for example cd or ls
The option is an additional need for the command. It is possible to change the outcome of the release according to the task’s task, and we will know about this option. I don’t have to write that you will know what you will know.
The argument is simply the object or file that the command will be executed on.
Go back to our topic .. I knew how to know the task ..
Do we know how we deal with him?
By the command man
Example ..
Man ls
Here Hegelic remained explaining the use of the command and will tell you to use
And he tells you which option to use
Example for clarification.
We have a file named, for example, entered the file Dah file Want to View insided.
Write .. ls file
The command will show you the files inside the file and the command I entered into the file Fail.
Ok, the option is still to use it in simple order according to the order above
ls -a file
Alaobescn here is -a
Here, by telling me who is inside the file with the files hidden in it
Keeps its mission to show hidden -a files without Alaobescn de Hatnfz is very normal course in a lot of option is every option his mission.
We have an option left inside every matter of its own and it has such a form
-h
–help
-help
As written inside the command or tool profile
Ok if it is not working on the man or his option
Keep using the info command
info ls
This will show you everything about the order with the finest details.
We knew how to use the command and which task it was.
Minus a simple need, which is how we know his executive path
It is the place from which the command is executed through whereis
whereis ls
The command path will tell you
Lesson 5: Using the mkdir rm rmdir command
The basics of working together files.
First you should know the paths in Linux.
The path for the euser is home, and the path keeps all the files from the euser. I mean, if you have more than one, each user has a file separate from the other and the file is home.
Home contains discs, downloads and other hidden files related to the User profile, such as the bashrc file.
There are other such files, and commands executed take-off means entry Filter Results Top disc’s Bay and there are orders implemented GS system as a whole.
We assume we have an incremental pathway
/ Home / user / Desktop /
The first field: The user file for the user in the field
I mean, if we assume that his name is Eden, ltd, or any other name, it will keep the path as follows.
/ Home / Eden/ Desktop /
If we have such a file, you will find the HOM file containing a file for each user.
Another Desktop box: a special file Balauser who is the top disc’s Bay.
An important point in the files is gradation or father and son
Simply, the hom file is the parent of the euser file, and the eoser file is the father of the desktop or download file.
Simply more than the HOM file inside it, a file called for example Eden.
This is the name of the Aluser inside the Aluser file. You will find the file, the donkey, and everything about the laser. I think I clarified a lot
We separate each path from the second with the /
As shown above.
In addition, I explained how you know the current path you are in.
Via pwd command
We knew the basis of the files that anyone should know about.
The commands that we use in this lesson.
1- mkdir
2- rm
3- rmdir
The first mkdir command
This command we use to create a folder that means Folder
Use it as follows
I will create a file called linux
mkdir linux
This folder was created successfully
Note that the command is made up of one word, which is linux. Ok, if it consists of two syllables, it means linux system
If so.
mkdir linux system
Hanco volumes named linux and other middle one named system
Ok, what is the solution? We use two methods, the first way is with the sign.
As follows
mkdir “linux system”
The file was created successfully with two syllables and can be written again, provided it is inside the tag.
The second method by tag \
As follows
mkdir linux \ system
The file was created successfully
We knew how to create one file
Ok you want to do a file tree, that is, a file inside a file inside a file like this
I need her name, options, and I just explained it in the last post.
We will use Option
-p
As follows
mkdir -p Eden/ bartosha/ ltd
Inside the file of Eden in bartosha and inside the file of bartosha in ltd
Negi to the last thing left is deletion
The two commands rm – rmdir
Rmdir command
To delete empty folders
As follows
rmdir Eden
The second command to delete text files and folders
As follows
If Htkhzv text file.
rm file.txt
If you would delete a folder or folder with its contents
rm -r eden
Also, the folder will be deleted with all its folders or text files, it will delete everything.
Lesson Six: Use cp mv command
Peace, mercy and blessings of God
God willing, we will complete Linux lessons on dealing with files
First, if you do not know the difference first Mtghabt difference
When I say a folder, it means Folder.
File means
Text file like word or txt. Doc
Each type has orders executed.
But, in common orders between them at the end of the series, they mention each type and any commands related to it …
God willing, we will explain the transfer and transcription orders.
mv
cp
The first command is mv
To transfer files and change the name of the file or folder
Of course, every order has an option, and we knew that the option means tasks that lead to a change in the result.
Review previous lessons.
We have a file named file1, I want to transfer it to the path
home / bartosha / Desktop /
The matter
mv file1 home / bartosha / Desktop /
By saying transfer the file to the folder
If I want to transfer it, but with a different name
The same, but at the end of the day the new name will be written
mv file1 home / bartosha / Desktop / file2
If I want to change the name without transferring the file
mv file1 / file2
This is not the name.
The second command is cp
To copy the file
Same use as the first command, but change the command from mv to cp
Just note use
We will move a file into a file or file for a path
I have a file named file1 so we will move it inside file2
cp file1 file2
And he has an option that you can know through the command man
Lesson Seven: Permissions in Linux
Peace, mercy and blessings of God
Powers are policies or laws established by the creator of the file and no one can change it except the owner of the file and the root account
Powers to keep in Powers.
1- Owner (file owner)
2- Powers on the file
Q1 – Who is the owner?
He who has powers over the file and is divided into three owners
1- The owner or the originator of the file
2- Groups
3- Others
1- The owner of this file
He is the one who has all the powers over the file, including also adding authority to groups or others.
2- Groups
It is a group of Alazer to whom the owner applies certain powers.
3- Others
They are the rest of the user who can see the file meaning that they are not in any group. Separate accounts.
- Powers
Powers here are three Powers which are divided into two or two types
1- Digital powers means adding numbers
2- Mathematical powers that use the account
The powers are (read – amend – implement)
(Read write excute)
How to give files permission.
I will tell you a story.
There is a user named ahmed who created a file named file.txt and tried to view this file information
Ls -ll file.txt
He appeared to him take out the following
-rwxrw-r–. 1 root root 84 Jan 4 21:40 file.txt
Come, let’s explain this
-rwxrw-r– de powers
What does this mean? - It means that this text file is not Folder Le Folder, you will find the letter d
rwxrw-r-
The first three letters rwx states this is the owner of this file
R read w write x excute
The second three letters -rw countries for groups The powers of groups We knew means what rw means what remains – I mean there is no validity you can say it is forbidden to do the implementation of the file is modified and read only
The third letter –r we knew, of course, which means write – mandatory powers
Countries belonging to the rest of the Aluser mean the others.
1- This means a number that is given to the file, and it tells you how many tracks it is possible to reach through it, and is it.
Root is the owner of the file
Root This group has powers over the file
84 file size after this date and time the file was created.
We knew the meaning of this speech any time
Q1 – How do we define the powers?
In order to define the powers, we need to know two methods
And they are two
1- Absolute mode
2- Symbolic mode
Absolute mode
Here, we define the powers with numbers, meaning each authority has a specific number as follows
Read = 4
Write = 2
Excute = 1
I mean, this statement is simple, pure, engineering, a simple example
We have a file I want to give him powers that will be as follows
Owner = read write excute
Collections = read excute
Others = read
This will keep the following powers like my numbers
Owner = 7 This is how we added read write excute, give us number 7, correct 4 + 2 + 1 = 7
Groups = 5 read excute 1 + 4 = 5
Others = 4 read
For clarification, see the value of each validity, collect them and write the result of the combination
Minus command to execute powers via the chmod command
chmod +754 file.txt
I forgot to tell you, in order to execute the matter or give powers, you must keep calculating root or caution
If we run this command, it will keep the file information as follows
rwxr-xr–. 1 root root 0 Jan 5 18:44 file.txt
If we analyze the result, you will look like we calculated above
The owner has all the powers the group reads and executes the others read
Symbolic mode
The way we will rely on this calculation.
You will remain as follows
Here are the icons
U – owner
G – group
O – other
mathematical calculations
- Add validity
- Delete validity
We will take the same example above
Owner = read write excute
Collections = read excute
Others = read
You will understand it about the matter
Chmod u = rwx file1.exe
Chmod g = rx file1.txt
Chmod o = r file1.exe
Ok if I want to add validity or fairness, for example, to others
Chmod o + x file1.txt
If Achille wants Hanger + expires –