Beginner's Guide

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Desktop environments

#21 Post by beginners-guide »

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: http://forums.debian.net/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

#22 Post by beginners-guide »

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

#23 Post by beginners-guide »

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

#24 Post by beginners-guide »

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

#25 Post by beginners-guide »

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

#26 Post by beginners-guide »

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

#27 Post by beginners-guide »

7) Window Managers:overview.

see more in the additional information section.
http://forums.debian.net/viewtopic.php? ... 91#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

#28 Post by beginners-guide »

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

#29 Post by beginners-guide »

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

#30 Post by beginners-guide »

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

Building your own desktop

#31 Post by beginners-guide »

B2.1)Building your own desktop:

In some cases you might not want to have a full desktop environment. Old hardware, and poor or expensive internet connections and the desire for speed, are a major reasons for considering a lighter system. If you did a minimal installation of Debian without any desktop environment, you will need to build your gui by hand. You will need, as an absolute minimum, two things: the X-server (xorg) and a window manager.

You boot your debian gnu/linux system and you will see a black screen with a login prompt. Login as user and become root with typing su and your root password afterwards.

Lets assume you want to install fluxbox:

su (to become root)
apt-get install xorg fluxbox (to install the necessary packages)
xorg --configure (to create the xorg configuration file)
cp xorg.conf /etc/X11 (to copy this file to its proper final location)
exit (to exit root. )

You may of course replace fluxbox with any window manager or minimal environment you prefer.


Now you will need to create a file in your home directory called .xinitrc. This contains basic instructions for starting up your gui. Make sure you are in your home directory ( /home/your_user_name). pwd should tell you and cd will take you there if necessary.

The file .xinitrc doesnt exist yet. Let's create it with the nano editor, as this is always installed and is easy to use (it shows the cheat-codes at the bottom of the screen).

nano .xinitrc
to be absolutely sure you will create it in your home directory type
nano /home/your_user_name/.xinitrc
(but replace your_user_name with your actual user name)

nano opens and you enter the following:
exec startfluxbox
Hit Ctrl and X to exit nano, you will be asked if you want to save the changes, type Y to say Yes, you will be offered to save it under the name you opened it (.xinitrc) and you hit the enter-button to accept that.

To start a fluxbox session you simply enter your user name and password to log in and then type:
startx
Your session should start.

As not everyone is using fluxbox here are some examples for the .xinitrc commands to start other window managers:
exec gnome-session
exec enlightenment_start
exec e16
exec icewm-session
exec startlxde
exec startxfce4
exec startkde
exec openbox-session
exec openbox-session-kde
exec openbox-session-gnome
exec startfluxbox

Usually the command you need is to be found under /usr/bin, so check for a promising command there:

ls /usr/bin | grep name_of_window_manager

If at some later date you decide that you want a graphical login, you can simply install a display manager like gdm or slim.

More options:
http://wiki.debian.org/xinitrc
If you want to auto-login, check this how-to:
http://forums.debian.net/viewtopic.php? ... 33&start=0


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Window managers

#32 Post by beginners-guide »

B2.2) Window Managers:composting, Stacking,Tiling.

An overview of window managers:Stacking:
A lot of Debian users don't use a full desktop environment like gnome or kde-full (composting window manager http://en.wikipedia.org/wiki/Compositing_window_manager ). Some prefer to install a smaller version of the desktop environment they like: gnome-core or kde-minimal. Some prefer installing a window manager. Desktop environments also make use of a window manager (to manage how windows are shown on the screen).
Gnome uses metacity
Kde uses kwin
Xfce uses Xfwm4
and lxde uses openbox
but they also come with a whole environment. It's kind of a comfort, you get all kinds of applications and tools that you need, for example automounting of partitions, a display (login) manager, etc.
When using a window manager on its own, you will need to add the applications and tools that you want yourself.
http://en.wikipedia.org/wiki/Comparison ... w_managers
http://en.wikipedia.org/wiki/Metacity
http://en.wikipedia.org/wiki/KWin
http://en.wikipedia.org/wiki/Xfce#Xfwm

Which way to go?
In general there seem to be two ways to make use of a window manager:
a) you can install it on top of the desktop environment you already have. At the login-window choose to boot into it and you are done.
The advantage is that you may use all of the applications you already know and don't need to worry about an application going missing
b) you can also choose to install a minimal Debian system without a desktop environment during the installation (tasksel).
As a minimum you have got to install xorg and a window-manager to be able to make use of a graphical environment. Perhaps you want to add a display manager (gdm, kdm, xdm, slim),
so that you will get a graphical login screen.
After that you can add all the applications that you need and will have to configure the look&feel to your needs.

About how to install with the second method and how to do the fine-tuning you may want to have a look at one of the following how-to`s:
-http://forums.debian.net/viewtopic.php?f=16&t=5450 ### icewm configuration by Lou
-http://forums.debian.net/viewtopic.php?f=16&t=5382 ### fluxbox configuration by Lou
-http://forums.debian.net/viewtopic.php?f=30&t=47561 ###enlightenment configuration by Bro.Tiag

Tiling window managers: Overview:
Tiling window manager are window managers without frames. This means that there is no "window", as such to grab and move with a mouse. Instead they tend to be keyboard driven. They also tend to use your screen real-estate to the maximum. The advantages of tiling window managers is they are faster, slimmer and don't tend to rely on a mouse. The disadvantages is they tend to be the hardest to configure and assume much prior knowledge.
As a Beginner, unless there is an over riding need to use one. It is recommended that you become familiar with a Desktop environment or an ordinary window manager first. That said, if you are wanting to learn and run an often command line based system they are well worth looking at.

http://en.wikipedia.org/wiki/Tiling_window_manager

Awesome window manager:
http://forums.debian.net/viewtopic.php?f=16&t=36453
http://en.wikipedia.org/wiki/Awesome_(window_manager)

EvilWM
http://www.6809.org.uk/evilwm/

Rat poison
http://www.nongnu.org/ratpoison/

XMonad
http://xmonad.org/
http://xmonad.org/tour.html
http://en.wikipedia.org/wiki/XMonad

I may add to this section. You may want to....

File managers:GUI:overview
Konqueror
Dolphin
Nautilus
Thunar
PCManFM
Rox-filer
gentoo
xfe
xfehttp://roland65.free.fr/xfe/index.php?page=home

I may add to this section. You may want to....

File managers:CLI:overview
GNU Midnight Commander
http://www.midnight-commander.org/


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Command line; terminal emulators

#33 Post by beginners-guide »

B3) The command line:

B3.1) terminal emulators

The Terminal window:overview

windowed:
mrxvt:
http://code.google.com/p/mrxvt/

Aterm:
http://www.afterstep.org/aterm.php

Konsole:
http://konsole.kde.org/

Eterm:
http://en.wikipedia.org/wiki/Eterm

xterm:
xterm is the default terminal, so it always is there. Why not get used to it and use it ?
copy and paste the following and create an .Xdefaults in your home-directory:
nano /home/your_user_name/.Xdefaults
and insert it:

!after editing .Xdefaults it may be reloaded with:
!xrdb -load ~/.Xdefaults

xterm*VT100*geometry: 94x28
xterm*font: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1
xterm*background: black
xterm*foreground: lightblue
xterm*loginShell: true
xterm*scrollBar: true
xterm*rightScrollBar: true
xterm*title: XTerm
xterm*iconName: XTerm
xterm*saveLines: 50000
xterm*jumpScroll: true
xterm*scrollTtyOutput: false
xterm*scrollKey: true
xterm*alwaysUseMods: true
xterm*metaSendsEscape: true
xterm*utf8Title: true

check for different fonts in: /usr/X11/fonts/
run:
xrdb -load
and voila: you got a useful or readable xterm
http://invisible-island.net/xterm/xterm.faq.html
http://en.wikipedia.org/wiki/Xterm

Dropdown: Quake style:
guake:
http://www.guake-terminal.org/
tilda:
http://tilda.sourceforge.net/wiki/index.php/Main_Page

Splitscreen:
terminator:
http://software.jessies.org/terminator/



back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Editors

#34 Post by beginners-guide »

B3.2) Editors:

Command-line editors: CLI.

Every Linux distribution includes at least one command-line editor. These editors work independently of the graphical X interface and can therefore be used for rescue and repair work even if X is down. They can also be used, of course, in a terminal window within X. The most commonly used command-line editors are nano, vi and emacs.


The nano editor
This, as its name implies, is the smallest and simplest of the command-line editors. Almost every Linux distribution includes it. It is derived from pico, which was originally an editor that came with the pine email client. Nano does not include "bells and whistles" like syntax highlighting.

Most nano commands consist of keystrokes modified with either the CONTROL key or the ALT key. The function keys along the top of your keyboard can be used as alternatives to some of these. Printable characters are not commands and are always treated as text to be input. Nano is thus not a modal editor like vi. The most commonly used commands are displayed in two lines at the bottom of the nano screen. These include the output (save) command (^O or F3), the exit command (^X or F2) and the help command (^G or F1). The arrow keys (plus HOME, END, PAGE UP, PAGE DOWN) are used for navigation.

The help command displays all the commands used in nano.

Because nano displays its most commonly used commands as "cheat codes", novices often find it the easiest of the command-line editors to use.

http://www.debianadmin.com/nano-editor-tutorials.html
http://www.nano-editor.org/docs.php

The vi Editor
vi (pronounced vee-aye for Visible Interface) is an old Unix command line editor, still much loved and used. It was the first editor to show the whole of a file rather than just the current line. The version of vi used in Linux is called vim (vi improved). It is adapted to the PC keyboard and has a lot of extra functionality such as syntax highlighting. vi has a rather steep learning curve but is a very fast and powerful editor.

vi is a modal editor; what you enter via the keyboard will be interpreted differently according to what mode or internal state the program is in. There are three main modes: normal, insert and command line.

You start in normal mode. All keystrokes are interpreted as vi commands, which are executed immediately; if the keystroke does not correspond to a valid command, you get an error bleep.

There are several vi commands that switch you to insert mode. In this mode, what you type is interpreted as text and put into the file. There is a variant of insert called replace, in which new text overwrites old. You can toggle between insert and replace with the insert key. In vim (but not in the original vi), the word INSERT or REPLACE is displayed at the bottom of the screen to show you when you are in either of these modes. You return to normal mode by pressing the escape key.

The ":" command switches you to command line mode. A command line appears at the bottom of the screen where commands can be typed and entered with the return key. The read, write and exit commands belong to this mode. You can even access shell commands.

There is a graphical form of vim called gvim which is perhaps easier for novices to use. It has a menu bar and a toolbar and supports the usual mouse operations as well as all vi commands.

vim comes with an excellent online manual. Simply type "vim" without specifying a file and press F1.


emacs:
http://www.gnu.org/software/emacs/tour/


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Commands

#35 Post by beginners-guide »

B4) Commands:

B4.1) Commands for processing the contents of files:

Linux has a number of commands which enable you to look inside files. Here are a few of them.

cat filename: Lists the contents of a file to the terminal.

file filename: Shows the type of data that a file contains: e.g. ascii text, shell script, executable program, image file, etc.

grep pattern filename[s]: Searches for a text pattern within one or more files. The pattern may be a literal string or a more complex regular expression involving partial wild cards. The output consists of the line matching the pattern (and optionally some context lines). If a group of files is searched, the output also contains the file name within which the pattern was found.

head [-n] filename: Lists the first n lines of a file (default 10)

less
filename: Lists the contents of a file page by page. You can move backwards and forwards using Page Up and Page Down and also search forward for particular patterns or strings using /, or backwards using ?. less is the pager used internally by the man command.

more filename: Similar to less but less flexible. You move forward by pressing the spacebar and backwards with b or ctrl-b. You can only search forwards. One advantage of more when processing files is that it tells you what percentage of the file you have covered. Another common use for more is to page the output of commands. So ls -l|more gives a full listing of a directory, page by page.

readlink filename: This only produces output when filename is a soft link (shortcut file). It shows the file or directory that the link points to.

tail [-n] filename: Lists the last n lines of a file (default 10). The opposite of head.

Regular expressions have been mentioned under grep. They can also be used in search mode within more or less, within the vi and emacs editors, and in a number of other traditional UNIX utilities for analysing text. A regular expression can be something as precise as a literal string or as vague as a wildcard – or anything in between. Regular expressions allow you to include everything you know about a string without making any unwarranted assumptions about what you don’t know.


Regular expressions can be quite complex but here are a few rules for making simple ones:

1) Most characters represent themselves. A few have special uses: the most important of these are "\", ".", "*", "+", "^", "$", "()", "[]", and "{}".

2) "\" is the escape character. Put in front of any special character, it makes that character literal and non-special. \ also works on itself! "\\" is the way to specify a literal backslash character.

3) "." represents a single wild character (the equivalent of "?" in a filename).

4) Digits within braces {} are multipliers. ".{3}" means three wild characters. Otherwise digits represent themselves.

5) "*" and "+" are wild multipliers. ".*" means any number of wild characters (including zero!) while ".+" means any number of wild characters but at least one.

6) Characters in square brackets map to a single character which may be any one of them. So "[0-9]" means any digit, "[aeiou]" means any lower-case vowel. If the first character of the group is "^", then the characters that follow are excluded. "[^,;:?!]" maps to one character which may not be a comma, semicolon, colon, question mark or exclamation mark. Note that "^" is only special when it is the first character of the group; in any other position it just represents itself.

7) Parentheses are used simply to group characters. So "(ac){3}" means "acacac" whereas "ac{3}" means "accc" .

8 ) Outside of square brackets, "^" represents the beginning of a line. "$" represents the end of a line.


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

File and folder handling commands

#36 Post by beginners-guide »

B4.2) File and folder handling commands:

These commands duplicate the work of graphical file managers like nautilus, Konqueror and thunar, but they are often a lot faster, especially when processing large directories.

cd pathname Goes to the specified directory. Without pathname, goes to the home directory. cd $OLDPWD is a convenient way to get back to the previous directory (OLDPWD is a variable automatically created by the bash shell).

chgrp new_group filename Changes the group ownership of a file that you own personally. The new group must be one that you belong to.

chmod [g][o][a]±[r][w][x] filename

Changes the access permissions for a file, granting or refusing read (r), write (w) or execute (x) access to the user/owner (u), the group (g), others (o) or all of them (a).

chown [new_owner].[new_group] filename Changes the ownership (personal, group or both) of a file. For security reasons, only root can use this command.

cp filename1 filename2 or cp file[s] directory The first form creates a copy of a file with a new name; the second copies the file into another directory. This second form can be used with multiple filenames or a wildcard. To copy files to the current directory use ‘cp pathname[s] .’ Here the dot serves as a synonym for the current directory .

ln [-s] target linkname Makes a link to a file. The -s option produces a soft link like a Windows shortcut. Otherwise a hard link is made. Hard links are simply synonymous names for the same file, whereas a soft link is a separate file that accesses another file by name.

ls pathname Lists the specified directory. Without pathname, lists the current directory. ls has many options. The most useful are probably:

-a to list all files including hidden ones

-l to list in long format: type, access permissions, owner and group owner, size, creation date and name. For a symbolic link file, the target file is also shown

-h used in conjunction with -l gives file sizes in bytes, kilobytes or megabytes as appropriate (otherwise only bytes are used)

-R lists recursively, i.e. contents of subdirectories as well.

mkdir pathname Creates a directory

mv filename1 filename2 or mv file[s] directory Renames a file or moves it to another directory. To move files to the current directory use ‘mv pathname[s] .’ cp and mv use very similar options. Useful ones include -R, which copies or moves directory trees recursively, -d, which copies link files rather than their targets, and -f which forces overwriting of any files of the same name. Otherwise if a file with the same name as the target file already exists, you are asked if you want to overwrite it.

pwd (print working directory) This displays which directory (folder) you are currently in, in the file system

rm filename Deletes a file. This command has several useful options: rm -i asks for confirmation before deleting. You can set this as a personal default. The system default is not to ask. Rm -f cancels the previous option if you have chosen it as your normal way of deleting. Deletion takes place without asking for confirmation. rm -R deletes directories with all the files in them.

rmdir pathname Removes an empty directory. It is also possible to delete directories that contain files but not with this command.


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Misc usefull commands

#37 Post by beginners-guide »

B4.3) Miscellaneous useful commands:

There is no limit to the commands that can be run from a terminal, since the name of every program that is installed in your command path becomes a useable command. However the following commands are particularly useful.

`apropos string` lists commands whose brief descriptions contain string. It is a good way to find out if there is a command that does a particular thing.

date prints the current date and time. It can also be used, with suitable options, to reset these.


dmesg prints out the recent kernel messages. Usually these are the boot messages, as the kernel seldom has anything to say once the system is running smoothly. This is a good way to check for recent kernel error messages.


echo prints its argument to the terminal. It is a good way of finding out the values of current shell variables. For example echo $PATH will print out your current command path.

find searches for files in the current directory (or in a specified directory) and its sub-directories. It is a very powerful utility which can search by name, ownership, permissions, date, size and many other properties, including combinations. Most commonly you search by name: find -name filename. Note that if the filename includes special characters, including wild characters, you will have to enclose it in quotes.

`kill process_ID` or `kill command` is used as an emergency killer for processes that have stalled or are otherwise misbehaving. A process running on a terminal can usually be crashed with CTRL-C or CTRL-\. However the kill command may be necessary for background or graphical processes.

locate search-string searches for files anywhere in the system. Unlike find, which works in real time, locate uses a precompiled database which needs to be updated regularly (preferably every day). It is thus much faster than find but not as reliable. locate interprets its argument as a string, not a filename; it will return all filenames that contain the string. It also accepts regular expressions (see paragraph on Regular expressions in file content processing document below) which allows for more precise matching.

mount
devicename mounts a storage device such as a floppy, cdrom, dvdrom or pen-drive. Desktop environments like gnome automount devices when they are plugged in, but if you want to use a simpler desktop in order to save resources, you will need to mount them by hand. This simple form of the command works if the device is listed in /etc/fstab with the user option set. Without this option, you will need root access. For devices not in fstab you need root access and, in addition, you must specify the mount point and the file system used:
e.g. mount devicename mount_directory -t filesystem.


umount
devicename unmounts a storage device mounted with mount. If it has the user option set in fstab, it can be unmounted by the user who mounted it; otherwise you will need root access. You can also use umount mount_directory.

whatis command gives a brief summary of what a command does. This will work for any command that has an associated manual page, whether it is on the current command path or not.

which command is a quick way to find out if a command is available. If it is, the full pathname will be returned. Note that which only searches your current command path; by default, the command path of ordinary (non-root) users does not include the system directories /sbin and /usr/sbin so, unless you have added them, commands in these directories will not be displayed


back to the table of content

beginners-guide
Posts: 38
Joined: 2010-12-20 19:18

Graphical user interface

#38 Post by beginners-guide »

B5) Graphical user interface (GUI):

GTK + QT:
Are tool kits used to create GUI's, for applications. Because these tools kits offer a slightly different look and feel. Many people try to stick to one or the other when choosing applications. Some popular applications are available built with either tool kit. There are also "themes" that are available to make them look similar.

GTK:
http://www.gtk.org/
http://en.wikipedia.org/wiki/Gtk
GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. GTK+ it is written in C, but has bindings to many other popular programming languages such as C++, Python and C# among others. GTK+ is licensed under the GNU LGPL 2.1 allowing development of both free and proprietary software with GTK+ without any license fees or royalties.

QT:
http://qt.nokia.com/products
http://en.wikipedia.org/wiki/Qt_(toolkit)
Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.

Features

* Intuitive C++ class library
* Portability across desktop and embedded operating systems
* Integrated development tools
with cross-platform IDE
* High runtime performance and small footprint on embedded


back to the table of content

jesus92gz
Posts: 121
Joined: 2015-02-06 18:07

Re: Beginner's Guide

#39 Post by jesus92gz »

Thank you for this guide.

I would also recommend these links I coulnd't find in this guide:

Linux Foundation's Introduction to Linux
Introduction to Linux course, directly from the Linux Foundation. You can also certify for 99$, or just learn for free, doing an exam when you're finished.
It's an interactive course with video demonstrations, images, labs and tests to evaluate yourself.
Personally, I'm doing this course.

Linux Foundation Free Learning Resources
Here you will find free resources, including the previous Introduction to Linux Course and some other useful resources.

Edit: A good resource I did not added is the Debian Administrator's Handbook

User avatar
Tornago
Posts: 4
Joined: 2015-05-06 19:22

Re: Beginner's Guide

#40 Post by Tornago »

Here is another useful website for learning Linux. Most examples are from Ubuntu.
I've failed over and over and over again in my life and that is why I succeed.

Locked