Maybe you are new to this operating system or maybe you already know the Debian basics. When you learn a new computer operating system you feel like learning a new language, not your native, but a foreign one. You may use tutorials, books, documentation, these are very helpful, but without any practice it may be useless. In order to offer you some help we elaborated some basic points regarding the Debian console basics which you may consider useful information, especially if you are getting started now.

First of all, let’s start with the shell prompt. After you login you will be able to use Debian shell prompt, also known as command prompt, which will be displayed in the left side of your monitor. What is its purpose? Well, for the moment it is waiting for you to write some commands there. The welcome message for the shell prompt can be easily customized if you edit the file ‘etc/modt.tail’. So, you are in the shell which will compile your future commands.

You may have installed the X Window System with Gnome (a display manager) you will see the graphic screen at logon. You are logged in now, and if you made this with a super-user or the root account you can do some pretty cool administrative tasks: remove, write and read any file on the system, no matter what their permissions are, set file permissions and ownerships, set passwords for other users on your Debian system or, check this out, you can login to any other account without even knowing the password they use. As you can see there is nothing you cannot do if you are the root user. Be responsible while using this account and never share your password with other people. Stay safe!

If you want to get to the root shell prompt using the root password you can acquire this by:

  • typing ‘root‘ when you are in the basic command prompt
  • typing ‘su -1‘ from any user shell prompt (you will lose your current data)
  • typing ‘su‘ from any shell prompt (keeping some of your current data)

If you finished your job on the current session you can leave the command prompt in Debian typing the keys ‘CTRL + D‘, pressed together, and your shell activity will be done. If you are in the character console this command will get you back to the shell prompt. Other way to leave the prompt is to type ‘exit’ at the command line. When your job is finished and you want to shut down the system from the command line using ‘shutdown -h now’. Instead, if you want to recover a console (maybe after your screen went berserk) you can write ‘reset’ on the shell prompt on Debian.

You are now able to use the Debian operating system without any risk, but make sure to read also the Security Manual from Debian documentation, because you have to use a non privileged user account to stay safe. Of course, you will have to go deep with the shell prompt, but this article offered you an overview which will be helpful for you in the future.

These are some other commands that you will find very useful:

 

Command 

Description

clear

Clear the screen. This command clears  your  screen if this is possible.

echo

Display text on the screen. Mostly useful when writing shell scripts.

more

More is a filter for paging through text one screenful at a time.

less

An improved replacement for the more command. Allows you to scroll backwards as well as forwards.

grep

Search for a pattern in a file or program output.B y default, grep prints the matching lines.

lpr

Print a file or program output. lpr uses a spooling daemon to print the named files when facilities become available.

sort

Sort a file or program output.  Writes sorted files concatenated.

su

su – Switch User is the command that allows you to switch to another user account.

Page 1 of 11