Ch 5 Connecting to Red Hat Enterprise Linux 9 Flashcards
(65 cards)
What is the difference between a console and a terminal?
console: the environment a user is looking at – what you see when you looking at your screen
terminal: an environment opened ON the console, and provides access to a nongraphical shell – usually Bash. Terminal, aka the shell, aka the Command Line Interface, aka the CLI
Where are a console and terminal the same thing, and where are they not?
in a text environment only environment, they are the same
in a graphical environment, they are not. console is screen and terminal is the shell
you can have multiple terminals on a console, but you cannot have multiple consoles in one terminal
true
what are two ways to connect to a server?
remotely, or the local console login (localhost login)
What must you remember during linux installation in order to have more than just the root user offered at the localhost login?
give the root user a password, create a regular user…
why is it better to login as a regular user and not the root user? list 6
- makes it harder to make serious mistakes
- you often don’t need root permissions
- attackers not only have to guess the root password, but the guest username as well
- if you need root access, use sudo -i to open a root shell, using your current user’s password – this is more secure than su -, because you don’t type in the root password. any only some users are authorized to do this
- type su - to open a root shell,but you have to enter the root user password. you will work as root until you type exit
- use sudo for only specific admin tasks
why don’t subsequent terminals not need a password to be entered?
because all subsequent terminals are opened as subshells – and you have access to the same user account that the parent shell is logged in as
how can you open a subshell with a different user identity?
su - [name of user, or blank for root user]
or sudo -i to open a root shell
what is the utility of being able to open a subshell as another user?
to test and preview things under a different user?
how do you toggle between terminals in a non graphical environment?
do not use these in a graphical env!!
Alt + F1 – move to GDM graphical login (GNOME display manager)
Alt + F2 – provide access to curent graphical console
Alt + F3 – give access back to the current graphical console
Alt + F4 - F6 – give access to nongraphical consoles
how many terminals can you have open at a time?
six virtual terminals
an alternative to Alt-Fx to toggle terminals is what command?
chvt (change virtual terminal)
chvt 1 - goes to graphical login prompt
which virtual console is the default console, and what is it also called?
the first one, virtual console tty1 - has a corresponding device file in the /dev directory called /dev/tty1
(there’s a /dev/tty1 through /dev/tty6)
how must the terminal toggling keyboard shortcuts be altered in a graphical environment?
instead of Alt + Fx, you use Ctrl+ Alt + Fx
to go back from text environment back to GUI, do you need to add Ctrl to the Alt + Fx terminal toggle?
no
What systemwide configuration allows you to use X forwarding?
/etc/ssh/ssh_config
what type of file is associated with every linux environment terminal?
a device file
where are the files for pseudoterminals (terminals started in a graphical environment) located vs the files for virtual terminals?
/dev/pts1, /dev/pts2, /dev/pts3, etc…
vs
/dev/tty1, /dev/tty2, /dev/tty3, etc…
what is a useful tool during the exam to see that you have configured things properly?
reboot
the more often you reboot, the easier it will be to pinpoint what change led to the boot failure
true
what are 3 situations where a reboot is required?
- to recover from a serious problem the server hanging, kernel panics
- to apply kernel updates
- to apply changes to kernel modules that are being used currently and therefore cannot be reloaded easily
what are the drawbacks of simply cutting power to a server vs a planned reboot or shutdown?
processes have not yet written their data to the disk – it’s stored in a cache
how do you execute a proper reboot?
need to reboot in a way that involves systemd so it can orchestrate the proper shutdown of the other services
systemctl reboot or reboot
systemctl halt or halt
systemctl poweroff or poweroff
what’s the first process to start when a server boots?
systemd