Beginner's Guide

New to Debian (Or Linux in general)? Ask your questions here!

The command line

Postby beginners-guide » 2010-12-20 20:36

5) Running Debian:

5.1)The command line:

You may never want to use the command line interface (CLI). If that's the case, fine, but there will be times when you need to, and have to. It's a fundamental part of running a GNU/Linux system, so it's worth getting used to the basics at least...
http://linuxcommand.org/
http://www.linfo.org/command_index.html
http://www.linfo.org/command_line_lesson_1.html


back to the table of contents
Last edited by beginners-guide on 2016-01-14 16:13, edited 1 time in total.
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Installing software

Postby beginners-guide » 2010-12-20 20:38

5.2) Installing software :

A default desktop installation will already be set up to let you update, install, and uninstall software from the internet.

Getting software from the Debian repositories or CD's and DVD's if you have no internet or a poor connection, can be done with the command line tools, dpkg, apt, and aptitude. You can also install a GUI (Graphical user interface) application manager like synaptic.

Dpkg:
http://en.wikipedia.org/wiki/Dpkg
http://www.debian.org/doc/FAQ/ch-pkgtools.en.html
Apt:
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
Aptitude:
http://en.wikipedia.org/wiki/Aptitude
Synaptic The graphical package installer remover and updater
http://www.nongnu.org/synaptic/
http://en.wikipedia.org/wiki/Synaptic_Package_Manager

Adding repositories and CD's or DVD's to your system:
In order for your system to know where to get new applications, libraries, plugins, and security updates, it needs to know where to get them from. This is done by adding details of the repositories and CD's to your sources.list file. This is a text file that resides in

/etc/apt/sources.list

By editing this file you can completely change the software available to your system. On a normal desktop PC you can expect to have over 20,000 “packages,” depending on the exact version you installed, and if you chose to include the “contrib” and “non-free” sections of the repositories.

Debian is a Free system and as you saw from the “social contract” only includes, and depends upon free software in the core system. All software in the “main” section of the repositories in your sources.list is Free-software.

For the convenience of it users Debian also links to “contrib” and “non-free” repositories. The “contrib” section is free software that links to or depends on some non-free software. The “non-free” section is non-free software as in proprietary, rather than cost.

This is what my current squeeze/testing sources.list looks like with comments. You will notice a hash "#" sign in front of some lines. This "comments out" or disables it and is common practice when wanting to retain information but disable it's action, or to add comments to any configuration file.

#####sources.list-start######
#deb cdrom:[Debian GNU/Linux testing _Squeeze_ - Official Snapshot powerpc xfce+lxde-CD Binary-1 20091123-11:38]/ squeeze main

deb http://ftp.uk.debian.org/debian/ squeeze main
#A short explanation: the deb part refers to the native Debian pre-compiled binary file, a deb. It's similar to a Microsoft .exe file or Mac OSX .dmg. Cdrom can point to any cdrom(s) from the package list that you may have downloaded. Then we have the mirror URL address. I'm in the UK so that's my closest. Next we have "squeeze" the version of Debian I'm running, followed by main the official free repository. If you need or choose to add contrib or non-free these would be added after main. e.g. deb http://ftp.uk.debian.org/debian/ squeeze main contrib non-free

deb-src http://ftp.uk.debian.org/debian/ squeeze main
#comment: deb-src indicates that this is linking to a source file repository. You can download the source code for any program on the system, modify it, and even build and package your own software with other tools in the repository.

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
#comment: Security updates are automatic by default.

deb http://www.debian-multimedia.org/ squeeze main
deb-src http://www.debian-multimedia.org/ squeeze main
#comment: This is a third party repository. It contains possibly patent encumbered code that is not included in Debian by default. Even though if may be free-software. (Were talking patents here not copyright.) You will also note that like many third party repositories, it does not respect the main, contrib, non-free protocol (even though I've not included them above, I could have). With all third party repositories it is up to you to check their status as to free-software vs. non-free, (There is an application in the repositories called "vrms" that can aid you in this.) It's up to you to check the license, security, and quality etc., of third party packages. The "Backports" repository falls under third party repository also.

edit:
Backports now official
http://lists.debian.org/debian-publicity/2010/09/msg00007.html
http://backports-master.debian.org/Instructions/


#####sources.list-end######


Take care to only add Debian specific repositories. Never ones for Ubuntu or other Debian based distributions. Installing a .deb package from such sources or downloaded from the internet does not mean it will run on any Debian system. The deb may have been compiled with different setting not compatible with a real Debian system.


back to the table of content
Last edited by beginners-guide on 2011-08-17 17:37, edited 1 time in total.
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

X: the graphical display

Postby beginners-guide » 2010-12-20 20:40

5.3) The graphical display: (referred to as "X" or as "X Windows")

The X Window System is a Free (Mit licensed), cross-platform system for managing a windowed GUI (graphical user interface). If you don't want to be looking at a blank screen with a flashing cursor you will need this. Sometimes, now rarely, “X” can fail to be configured correctly on installation. It may fail completely (blank screen and said cursor) or, for example, not use the highest resolution that your monitor supports. This is why it's so useful to gather information on your graphics card and monitor first. Debian has tools to help you configure X from the command line interface (CLI).

http://en.wikipedia.org/wiki/X_Window_System
http://www.x.org/wiki/
http://wiki.debian.org/XStrikeForce
http://wiki.debian.org/XStrikeForce/HowToRandR12


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

The basic system file structure

Postby beginners-guide » 2010-12-20 20:43

5.4)The basic system file structure:

If you come from Microsoft Windows you may well be wondering where the C, D, or E drive is! It's gone. If you come from Mac OSX, being based on BSD, the file structure may be more familiar. In Debian there is a single / root directory (folder) with everything placed in it. You can see a general view of how the subsequent directories are organised in the links below.
http://www.freeos.com/articles/3102/
http://www.comptechdoc.org/os/linux/use ... truct.html
http://www.comptechdoc.org/os/linux/com ... ilest.html


back to the table of contents
Last edited by beginners-guide on 2016-01-14 16:29, edited 1 time in total.
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Root and user

Postby beginners-guide » 2010-12-20 20:45

5.5) The concept of Root and user:

"root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser. "
Ref: http://www.linfo.org/root.html
An ordinary user only has control over files in his/her own "home" directory, though they may be "allowed" access to other files and applications.


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Desktop environments

Postby beginners-guide » 2010-12-20 20:51

6) Desktop environments, available repackaged on CD:

Under Windows and Mac OS you have a very limited choice as to your desktop environment (the actual interface displayed on the screen), DE for short. You get what you're given. It's a monoculture based on their file manager - Windows explorer in Micosoft Windows, and the Finder in Mac OSX.
Under Debian you get choices of several desktop environments, each with their own idea of what a good DE should be. Your choice may be influenced by which one you've used before, what your friends are familiar with, which is most similar to your current OS, or what you want to do and your PC's capabilities. You can forgo a DE altogether, if for example you want to create a server, or have an old PC so use a window manager, instead.
The look, feel and control of a Debian system can depend on many things. It can be extremely complex due to the flexibility of the system, and the users needs. Desktop environment or Window manager, and how they fit together with the huge range of applications and tool-kits, all have a bearing. Even if you choose to have no GUI, the CLI offers an amazing variety of looks and feel. The best place to start for changing the look and feel of your Debian system is the Debian repository's. Always be careful installing anything from other 3rd party external sites. If you have any doubts don't install. See: viewtopic.php?f=3&t=47866&

Search the repositories first with synaptic, apt or aptitude.

apt-cache search themes
apt-cache search icons
apt-cache search wallpaper

Desktop environments: (DE)
If you downloaded the first Debian CD. You will get the default Gnome Desktop which uses the GTK graphics libraries. The other most popular DE is KDE, which uses the QT libraries. There is also the XFCE (using GTK) desktop that is slightly lighter than Gnome and KDE. LXDE (GTK) is a very light DE. XFCE and LXDE are present on the same CD. Check their prospective sites before you decide which one you think is for you. You only need the first CD to get up and running. Just choose the Desktop you want. Don't download all 20 odd disks unless you need them. If your computer is powerful enough and has enough space you can install more then one DE. Then you get to choose which one you want to run at login.

https://en.wikipedia.org/wiki/Compariso ... vironments

back to the table of contents
Last edited by beginners-guide on 2016-01-14 16:32, edited 1 time in total.
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Gnome

Postby beginners-guide » 2010-12-20 20:53

6.1) GNOME:

From the Gnome site.
"GNOME is easy to use and easy to learn: the usability project team makes sure of it. GNOME has all the software you need every day: games, browser, email, office suite, and more. In addition, excellent Windows file compatibility means you can work with files that Windows users send you, and extensive manuals and help systems mean you're never without resources. "

http://www.gnome.org/
http://en.wikipedia.org/wiki/GNOME
3rd party Themes, Wallpapers, and icon can be found here.
http://gnome-look.org/


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

KDE

Postby beginners-guide » 2010-12-20 20:54

6.2) KDE:

From the KDE site.
"KDE or the K Desktop Environment, is a network transparent contemporary desktop environment for UNIX workstations. KDE seeks to fulfill the need for an easy to use desktop for UNIX workstations, similar to desktop environments found on Macintosh and Microsoft Windows operating systems."

http://www.kde.org/
http://en.wikipedia.org/wiki/KDE
http://wiki.kde.org
3rd party Themes, Wallpapers, and icon can be found here.
http://kde-look.org/


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

XFCE4

Postby beginners-guide » 2010-12-20 20:55

6.3) XFCE:

From the XFCE site.
"About Xfce
"Xfce is a lightweight desktop environment for various *NIX systems. Designed for productivity, it loads and executes applications fast, while conserving system resources." - Olivier Fourdan, creator of Xfce
Xfce 4.6 embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that together provide the full functionality of the desktop environment. They are packaged separately and you can pick and choose from the available packages to create the best personal working environment. "

http://www.xfce.org/
http://en.wikipedia.org/wiki/Xfce
http://wiki.xfce.org/

3rd party Themes, Wallpapers, and icon can be found here.
http://xfce-look.org/


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

LXDE

Postby beginners-guide » 2010-12-20 20:56

6.4) LXDE:

From the LXDE site.
"The "Lightweight X11 Desktop Environment" is an extremely fast-performing and energy-saving desktop environment. Maintained by an international community of developers, it comes with a beautiful interface, multi-language support, standard keyboard short cuts and additional features like tabbed file browsing. LXDE uses less CPU and less RAM than other environments. It is especially designed for cloud computers with low hardware specifications, such as, netbooks, mobile devices (e.g. MIDs) or older computers. "

http://lxde.org/
http://en.wikipedia.org/wiki/LXDE
http://wiki.lxde.org/en/Main_Page
Other 3rd party Themes, Wallpapers, and icon can be found here.
http://box-look.org/
http://debian-art.org/


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Building your own system with a netinstall

Postby beginners-guide » 2010-12-20 20:59

6.5) Building your own system with a net install:

With Debian you have the choice of doing a net install a from a minimalistic CD.
http://www.debian.org/CD/netinst/
You may want to do a net install if you have a poor internet connection or old hardware that would struggle with a full DE. You could then build your own lighter system using a window manager and a file manager of your choice.


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Window managers

Postby beginners-guide » 2010-12-20 21:00

7) Window Managers:overview.

see more in the additional information section.
viewtopic.php?f=32&t=58557&p=338591#p338591

A window manager controls the window your GUI applications run in. How you Move ,expand, hide, shrink, them, and how they inter-react with each other. There are three basic types. Composting, Stacking, and Tiling. Composting tend to be part of a Desktop environment. Some common window-managers you may use are: The "Boxes" blackbox,flux, openbox. Others include icewm, fvwm, Pekfm. All of these are quite popular with new users, so one of those might be a good start for a window manager.
http://en.wikipedia.org/wiki/Window_managers
http://xwinman.org/

File managers:
Quote ref: http://en.wikipedia.org/wiki/File_manager

"A file manager or file browser is a computer program that provides a user interface to work with file systems. The most common operations used are create, open, edit, view, print, play, rename, move, copy, delete, attributes, properties, search/find, and permissions. Files are typically displayed in a hierarchy. Some file managers contain features inspired by web browsers, including forward and back navigational buttons."
https://en.wikipedia.org/wiki/Compariso ... e_managers


back to the table of contents
Last edited by beginners-guide on 2016-01-14 16:34, edited 1 time in total.
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

Additional Info; intro

Postby beginners-guide » 2010-12-20 21:04

B) Additional information:

B1) Learning more: common tasks:

I may add to the sections below as and when. If anyone wants to contribute any of the below or suggest new section's in the same or similar "bite sized chunks" feel free to PM me on the debian.forums. If I can add it with out destroying the flow for new users I shall. If you find your addition is growing to big please post in into the "tips from our members" section or try and break it down. If it becomes overly technical please post to the how to section instead. I see this as an over view of facts, with each section linking to tips and solutions for the "stable" release in as few words a possible. Not a huge list of detailed tips and solutions, they should be in suitable sections of the forum in their own right.


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

su and sudo

Postby beginners-guide » 2010-12-20 21:06

B1.1) SU and SUDO:

The su and sudo commands are used in a terminal to give you root access to the system. You can of course log on as root but this is not generally a good idea; once logged on in a particular identity, you tend to continue in that identity until you log off again, and it is bad practice to work as root for long periods.

Instead you should use su to become root "for the duration". You will need to give the root password which you set when you installed Debian. Your prompt will change to show that you are now root. When you have done what you need to do as root, type exit to get back to your own identity.

The sudo command is a more selective alternative to su, particularly useful if there are several users of your system. By editing, as root, the file /etc/sudoers, you can give root access to a specific individual for specific commands only. This is much safer than letting them know the root password. The man page for sudoers gives details of the syntax for this file.

To use sudo, simply preface the command you wish to execute as root with the word sudo. You will be asked to enter your own password to prove your identity. The system will then check whether you have been given permission to execute this particular command as root; if so, it will be executed. Sudo "remembers" you for a short time so that you can give a group of sudo commands without entering your password each time.

Both the Gnome and the KDE desktops include graphical front-ends for su. The Gnome version is called gksu and the KDE version kdesu. Gnome also has a front-end for sudo, gksudo.


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

file permissions

Postby beginners-guide » 2010-12-20 21:07

B1.2) File Permissions:

In Linux, every file and folder belongs to some user who can, in principle, control other users' access to it. Access rights are known as "permissions" and there are three types: read, write and execute. Read allows you access to the file on a read-only basis; applied to a directory (folder), it allows you access to the files within. Write allows you to modify a file or to create, remove or rename files within a directory. Execute allows you to run a program or script contained in a file or to explore the contents of a directory.

Separate permissions are granted to the file's owner, to other members of the owner's group, and to the rest of the world. The full permissions can be seen if you use the command ls -l to list the contents of a directory in "long" form, i.e. full details.The file permissions then appear on the left-hand side of the output as a string of nine characters. The first three are the read, write and execute rights for the owner, the next three are for the group, and the final three for the world. A hyphen indicates that the corresponding right has not been granted.

So rw-r----- means that the owner has read and write access, the group read access only and the rest of the world no access at all. These would be suitable permissions for a data file. rwxr-xr-x means that the owner has read,write and execute access, and everyone else (group and world) has read and execute access only. These are typical permissions for a data directory or a Linux command.

All files that you create belong to you but you do not have to set the file permissions explicitly. New files are given sensible default permissions controlled by your user mask or "umask". You can use the chmod command to change the permissions on particular files from their default values; you can also use the umask command to change the defaults permanently if you do not like them.

Note that, as a security precaution, new files do not have execute access set, although directories may. Execute access to a directory is harmless; it merely allows you to browse the contents. Execute access to a file allows any program or script contained in the file to be run, which is potentially dangerous. So if you download something from the Internet, it will not be executable unless you explicitly make it so by using chmod.


back to the table of content
beginners-guide
 
Posts: 38
Joined: 2010-12-20 19:18

PreviousNext

Return to Beginners Questions

Who is online

Users browsing this forum: bmarnt, dx486 and 5 guests

fashionable