Welcome back friends. Here in this part we are going to learn about logging and some basic Linux commands and utilities. So let's start. So logging in rail comes in two types, command line interface and graphical user interface. CLA mg UI for short. You can log in with a CLA mode that are in redhead we have six virtual consoles or command line mode that can be switched by pressing the command control or f1 f2 f3 f4 f5 ns f6 six versal virtual consoles by changing the f1 to f6 and Ctrl Alt you can switch to graphical console by typing Ctrl or f7.
So in total, it has seven countries Close six virtual or command line and one graphical console. If you're interested in switching to graphical console, but it is a inactive, you can start it manually by just typing a start x sta RT x in any of the Virtual Console, the graphical mode, the default genome mode will start. So logging is simply by providing username and password and accessing your next up. graphical mode comes in two types, the genome and KD genome is default in real or Red Hat Enterprise Linux. And these two are covered under the concept of X Window. These are X Window options, which is usually associated with graphical or bitmap display.
Which can be configured. By using any of the two, you can install kte in place of genome. Actually, when you are using Mac or Windows, you get by default in G y mode which you cannot change. But with Linux, you can change it or even delete the graphical mode that's on you. To access a genome terminal, you can move to applications, accessories and terminal application is visible. On the screen the first screen on the desktop the homepage, on the top left corner, application is their move to application.
Hit the SSRS option and go to terminal or you can either type the word terminal or T or it will pop up on the screen Ctrl Shift t creates a new tab new session for terminal a new terminal control page up or page down switches new or previous tabs Ctrl Shift c copies selected text Ctrl Shift v paste a text on the prompt. It is different from Ctrl C and Ctrl V in Windows you need to type Ctrl Shift C and Ctrl Shift v shift plus page up or page down this calls you up and down I screen at a time. So these are the few shortcuts. When you are using terminal or Command Prompt. You can say on Windows. When you are logged in, you can change a user's password by simply writing password command p A SS WD no RS In between, or Oh in between.
When you type pa SS WD password command on the screen, it asks you the user name, the user name is actually whatever user you are logged in, that user is cached by default. You need to provide the old password a new password or with the GI mode, you can go to System Preferences about me and click on the Change Password. These are the two options. The very basic thing is that when you see a Linux terminal, there are two different signs which may appear to you on the screen. When you see $1 symbol, starting with every session on the every line starting at every line of the commands you execute, it is denoted that you are a non root user root is super admin or a special administrative account that is called super user, which is denoted by pound symbol or hash. When hash is there, you can know that root is being running the system.
When dollar is there, you have limited access to this system, limited rights, but route has all the rights. So, route has a near complete control over the system almost every control which is good if you are required, requiring certain facilities if you are a database administrator, or a system engineer or expert root user would be your preference, but it has nearly unlimited capacity to damage the system. Don't allow every user the root access access create multiple accounts Non root and allow them limited access, you can change the permissions and allow them only limited permissions. The permissions could be read write and execute permissions, which we will learn later, we will be setting permissions to various files for various users. It is very interesting. We can switch user for example.
Currently, I'm logged in as my name that is not a root user and a harsher account. And I want to change it to root or some other account. We don't need to log out from this session, we just simply need to open a terminal and type a command as you switch user. Just simply type Su, if you want a root access and just provide a password for the root and you will be logged in, or your session would change as root access. But if you want to access other users account, just write the name of other users. Press Enter, and then provide the password for that user.
When you are root and you want to access other users account, you don't need to provide password at all. However, it may ask you the sudo command is used to execute a certain command as root. Suppose I am logged in with non root account, say Andrew and I want to execute certain command that requires root access or root permission. So I don't need to log in with root I simply write su do sudo before that command, for example, I interested in running ls command. So sudo LS would be my syntax It will execute as root, but it has certain restrictions, root could block certain commands that could not be run from the client side. from other users.
There is another command called ID, which shows information of the current user. You can use that thing. Here comes three more command. One more command that has a history. History is useful when you want to learn about the previously tagged commands on your terminal. It creates a list of all the commands that were executed.
You can use it for proof, proof of work. For example, if you if you assign other person, your duty, for say, 10 minutes, you need to go to washroom. After 10 minutes when you arrive on the system, you suspect that he may have executed written explicit content or not writing you can press the history command and see a list of commands that is executed. If you want to check our last n number of commands say last 10 commands, just simply type history is paste the number. History seven would list seven commands history five will place five commands, or just typing history will list all the commands pressed from the installation of the computer or device. in Linux, or RTL, we get three default editors text editors, like the G editor, g edit, WAV, V, I am vi RGB, I am No graphical editor.
Here you can create your files, edit those file. And you could also execute that thing. Vi M is an advanced Full Feature editor, it is more advanced than g edit and GBM, the graphical versions, g vi m allows you regular expression and various things that you can access right from your terminal. Mostly next users use this utility. We will be trying all the commands we are learning here in the practical sessions. So, clearly was those practical sessions and try it yourself on your own Red Hat environment.
And if you have any doubt, you can ask it keep learning and keep moving ahead and implement your the concept you're learning here.