Configuration All system configuration files are under directory /etc/. nano files Default text editor.

If not present, try emacs, vi, joe. webmin at Browser interface to system https:// configuration, access is hostname:10000 defined in /etc/webmin/ miniserv.conf. CUPS at http:// Browser interface to printing hostname:631 system. dpkg-reconfigure Reconfigure a package, e.g. package-name console-common (keyboard), locales (localisation). update-alternatives Manage command options alternatives. update-grub After installing a new kernel. make-kpkg -Build a kernel packages from initrd -sources, if a customised revision=2:my.1.0 kernel is really needed, needs --rootcmd kernel-package. fakeroot --uc --us kernel_image m-a a-i module Create and install kernel_image third-party modules (nvidia, ...), needs moduleassistant. /etc/ Daemons and System /etc/init.d/file Restart a service, system daemon. restart /etc/init.d/file Stop a service, system stop daemon. /etc/init.d/file Start a service, system start daemon. halt, reboot, Halts, reboots, shuts down poweroff system. /var/log/ All log files are under this directory. /etc/default/ Default values for many daemons and services.

Important cat files cd directory cp files dest echo string gzip, bzip2 [d]files less files ls [files] mkdir directory-names mv file1 file2 rm files rmdir dirs tar [c][x][t][z][j] -f file .tar [files] find directories expressions grep search-string files kill [-9]number ln -s file link ps [options] su - [username] sudo command

Shell Commands Print files to screen. Change to directory. Copy files and directories. Echo string to screen. Compress, uncompress files. Show contents of files. List files. Create directories. Move, rename files. Remove files. Remove empty directories. Create, eXtract, list Table of archive file, z, j for .gz, . bz2. Find files like -name name or -size +1000, etc. Find search-string in files.

apt-get update

apt-cache search search-string apt-cache policy package-names apt-cache show package-names apt-cache showpkg package-names apt-get install package-names apt-get upgrade apt-get dist-upgrade apt-get remove package-names apt-cache depends package-names apt-cache rdepends package-names apt-file update

command >file command >>file cmd1 |cmd2 command <file

Send signal to process (e.g. terminate it). Create a symbolic link to a file. Show current processes. Become another user, e.g. root. Execute a command as root as normal user, see /etc/ sudoers Overwrite file with output of command. Append output of command to file. Use output of command 1 as input of command 2. Use file as input for command.

apt-file search file-name apt-file list package-name auto-apt

APT Update packages listings from package repositories as listed in /etc/apt/sources. list. Run, if the contents of one of repositories, the file changed, or if unsure. Search packages and descriptions for search-string. Show versions and priorities of available packages. Show package information incl. description. Show package dependencies (needed packages). Install packages from repositories with all dependencies. Install newest versions of all packages currently installed. Like apt-get upgrade, but with advanced conflict resolution. Remove packages with all needed packages. List all packages needed by the given. List all packages that need the given. Update content listings from package repositories, see apt-get update Search packages for file. List contents of a package. Installs packages automatically if needed, can replace apt-file, needs auto-apt. Console interface to APT, needs aptitude. GUI interface to APT, needs synaptic.

aptitude synaptic

Dpkg List packages. Show package information. List contents of package file. Show which package a file belongs to. dpkg -i pkg.deb Install package files. deborphan Show packages, on that no other packages depend (orphans), needs deborphan. debsums Audit check sums of installed packages, needs debsums. dpkg-divert Override a package’s version [options]file of a file. dpkg --compareCompare version numbers, versionsv1 gt v2 check with echo $?. dpkg-query -W -Query installed packages, showformat=format format e.g. ’${Package} ${Version} ${Installed-Size}\n’. dpkg --getWrite package selections to selections > file. file dpkg --setSet package selections from selections < file. file The Network Configure network interfaces. /sbin/ifconfig /etc/network/ Network configuration files, most relevant are interfaces and options. ifup, ifdown Start, stop network [device] interfaces according to files above. ssh -X user@host Login at other machine. scp files Copy files to other machine user@host:path (and vice versa). dpkg dpkg dpkg dpkg -l [names] -I pkg.deb -c pkg.deb -S filename

Web Server (Apache2) Configuration files. /etc/apache2/ /etc/apache2/ Defines default virtual host. sites-enabled/ default /etc/apache2/ Contains available modules mods-available/ files. To enable a module, create a symbolic link into / etc/apache2/modsenabled/. Database (PostgreSQL) Create a new database. createdb dropdb Remove a database. createuser Create a new database user. dropuser Remove a database user. /etc/postgresql/ Client access configuration. pg_hba.conf ALTER USER Change the password in the name WITH SQL console psql. PASSWORD ’password’; File and Print Server (Samba) Main configuration file. /etc/samba/smb. conf smbclient Browse SMB network resources, e.g. download, upload files.

Debian GNU/Linux Reference Card
Version 3.1-0.2, 2005-09-03 http://www.debian.org/ Getting Help man page or man Read online help for every bash command and many configuration files. command [--help, - Brief help for most h] commands. /usr/share/doc/ Find all documentation here, [package-name/] optional file README.Debian contains specifics. Web Reference, manuals, FAQs, documentation HOWTOs, etc. at http:// www.debian.org/doc/ Mailing lists at The community is always http://lists. helpful, search for users. debian.org/ Installation All information about it at http://www.debian.org/ devel/debian-installer/ CD images Download from http:// www.debian.org/distrib/ boot: expert E.g. to set up the network w/o DHCP or using LILO instead of GRUB. boot: linux26 Use Linux kernel 2.6 for or boot: installation. expert26 Bugs Bug Tracking at All about existing and fixed http://bugs. bugs. debian.org/ Package specific See http://bugs.debian. org/package-name/, use wnpp to ask for new packages. reportbug Report a bug by e-mail. Instructions at http://www. Reporting debian.org/Bugs/ Reporting Installer

Legal Notice This document may be used under the terms the GNU General Public License version 2 or higher. Conditions for copying and translations can be found at http://people. debian.org/~debacle/refcard/, where you can always get the latest version of the reference card.

Copyright c 2004 W. Borgert
Made by: http://people.debian.org/~debacle/refcard/