How To Open The Console In Linux

Table of contents:

How To Open The Console In Linux
How To Open The Console In Linux

Video: How To Open The Console In Linux

Video: How To Open The Console In Linux
Video: How to open terminal on Linux/Ubuntu 2024, April
Anonim

The console in the Linux operating system is used to work with the command line. You can run it both in full screen and in a window. The number of simultaneously open window consoles is limited only by the amount of computer RAM.

How to open the console in Linux
How to open the console in Linux

Instructions

Step 1

To work in the console, you do not need to start the graphical X Window System at all. This method works only if its automatic launch is disabled in your distribution. At the same time, you can work in four consoles at once, switching them with the Alt-Fn key combinations, where n is the console number. On some distributions, you can open the fifth and sixth consoles in the same way. If, instead of the command line, you are prompted to enter your username and password, enter them. You can start the X Window System from any of them by entering the startx command.

Step 2

When the X Window System is running, the full-screen console from which it started is busy. If this environment starts automatically, the first one becomes that one. To exit the graphical environment, save all files, close all applications, and then find in its menu the item corresponding to closing it without shutting down or restarting the computer. The name of this item depends on the shell you are using (eg KDE, Gnome, JWM). In particular, in KDE 3, to do this, press the button with the letter K and the gear, select the "End Session" item and press the "End Current Session" button. Note that on some distributions, exiting the X Window System may trigger an automatic shutdown of the OS itself. You can also exit the graphical environment abnormally by pressing Ctrl-Alt-Backspace, but in this case all unsaved documents will be lost.

Step 3

While in the graphical environment, you can manually switch between it and full-screen consoles. To do this, press Ctrl-Alt-Fn, where n is the console number. You can then switch between consoles by pressing Alt-Fn. To return to the X Window System, select the fifth or seventh console, depending on the distribution you are using.

Step 4

The most convenient windowing console is launched directly in the graphical environment. To open it, click the button with the image of a monitor with a black screen with a command line, or select the xterm, nxtern, Konsole or similar program from the shell menu.

Step 5

When commands are run as the root user, a # character is displayed at the command prompt, and when as any other user, a $ character is displayed. You can change the user using the login command followed by the username and password. You can also switch to root user mode with the su command, after entering which you only need to specify the password. In some distributions, there is no superuser mode - then commands on its behalf can be executed using the sudo utility.

Recommended: