Last Updated: 11 October 2013
On this page: |
Back to the Unofficial Debian FAQ
This page goes over some of the basics of using Linux, and a few basics of using Debian in particular. It's helpful to know these things before reading the Unofficial FAQ.
You can either open a terminal inside of your graphical environment, or you can switch your whole screen to a terminal.
To open a terminal in a graphical environment:
To switch your entire screen to a terminal, press Ctrl-Alt-F1. You can then switch between six different terminals, by using Alt-F1 through Alt-F6. Pressing Alt-F7 will bring you back to your graphical environment
To become root, first you must open a terminal. Then, you type:
su -
Note that the "-" is very important -- it sets things so that you have easy access to all the commands on the computer.
Then type in your root password. You would have set this when you installed Debian.
Another way is to press the "super" (Windows icon) key to access the overview and start typing "root". Then click on the "Root Terminal" icon.
If you can't find it in the menu, you can use the Terminal (see above about how to access the terminal). Most programs are executed by their name. For example, to launch the web browser, Firefox, you can simply open a terminal and type:
firefox
You can also type only part of the command and then press Tab. So you could type:
fir[Tab]
And that would type out firefox for you. If there's more than one command that starts with fir, you'll hear a beep. Hit Tab again and you'll see a list of all the programs on your computer that start with those letters.
If you really can't figure out the name of the command, but you know the name of the package the program came in, try this to list the programs in a package:
dpkg --listfiles packagename | grep bin
There are three ways to change your runlevel:
su -
init number
where number is the runlevel that you want to change to.
You will then be switched into the new runlevel.
kernel /boot/vmlinuz-2.6.30 root=/dev/sda2 ro
Add the number of your runlevel to the end of that line, and then press Enter. For example, to boot into text-only mode, the line would look like:
kernel /boot/vmlinuz-2.6.30 root=/dev/sda2 ro 3
You will then boot into the new runlevel this time only.
su -
vim /etc/inittab
id:number:initdefault:
where number is your current default runlevel (probably 2).
id:1:initdefault:
You will then boot into that runlevel every time you start the computer.
update-rc.d -f gdm remove
To revert back to a graphical login then run this as root:
update-rc.d -f gdm defaults
To run a command right after you boot, before anybody logs in, add the command to the file /etc/rc.local:
su -
vim /etc/rc.local
If you want to start a program right after you log in:
Another way is to press the "super" (Windows icon) key to access the overview and then start typing "start" to match the "Startup Application Preference". Click the icon and in the "Startup Programs" tab click "Add" and then specify the name of the program. You can do this for as many programs as you need.
passwd
And then enter your new root password when asked.
There are several ways to manage services in Debian, one using the graphical tools (although not all services can be managed this way), another is using a text user interface (TUI) and lastly using only the command line. If you're not in a graphical environment, use the command line method. It is highly recommended to use the command-line whatever environment you are in.
Using the command line (replace servicename with the name of the service you want):
You must be root for this to work.
service servicename status
service servicename start
service servicename stop
update-rc.d servicename enable runlevel
To boot into rescue mode, you must be able to boot the system using one of the following methods:
Once you have booted using one of the described methods, enter the following command at the installation boot prompt:
linux rescue