User:Eleanorg/Thematic1.1/Command Syntax 1

From XPUB & Lens-Based wiki
< User:Eleanorg
Revision as of 13:38, 28 October 2011 by Eleanorg (talk | contribs) (Created page with "BASIC COMMAND SYNTAX Ctrl C - closes running program Ctrl d - logs out of root, returns to daily user ls -l (ls with advanced info) ls -l listings syntax: drwxr-xr-x these are...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BASIC COMMAND SYNTAX

Ctrl C - closes running program Ctrl d - logs out of root, returns to daily user ls -l (ls with advanced info)

ls -l listings syntax: drwxr-xr-x

these are the permissions of the file organised by group (w=write, r=read, x=execture):

user - group - other


mkdir hello Creates new directory 'hello' touch w00t Creates blank file 'w00t'

In the above example, the user can write, execute and read the directory (wxr), the group the user is part of can execute and read it (xr), and everyone else can only exectute it (x).

> To install software

//Installation tools

dpkg - just unpackages stuff that's already on the disk higher level GUIs like synaptic pakcage manager execute lower level basic commands like dpkg

// Debian software is developed thru 3 stages: unstable, testing, and stable. You can chose which source to use - unstable gets you the newest stuff, stable gets you older but more reliable stuff. Another pool, 'experimental', is for stuff that hasn't yet made it into 'unstable'.

cd /usr/bin to see what's currently installed. tSoftware installed using a package manager (eg Synaptic) it will be put here. /usr/local/bin is where the binaries live. You won't see any files listed here. Put software here if you're gonna compile it manually from the binary.

You need to be logged in as root to install software whoami - prints who you're logged in as su - switch user (by default, will switch to root user. enter root password) which aptitude - will tell you where 'aptitude' lives aptitude - will launch the aptitude software installer inside the shell: Ctrl + t goes to the menu Esc Exits the menu Alt + F1 Takes you to the other, original shell session Alt + F2 Takes you back into aptitude / opens search box for software packages. OR go to menu > Views > List flat packages, and type 'l' to search - may get better results Type search term & OK. Matching packages will be listed. n next in list (or down arrow) Enter Shows details of selected package including Depends (dependencies - name plus version. >= 3.0 means 'version 3.0 or later'). Ctrl + t Marks for installation - it will change colour/be marked with a symbol q quit, go back to main window u updates (what does this do?) g installs packages marked for installation q quit aptitude

when you've marked all desired packages type 'g'. It will list all the marked packages. If you're sure you want to go ahead, type 'g' again to install

//ADVANCED CUSTOMISATION OF APTITUDE Each piece of software has an associated list of 'depends', 'suggests' and 'recommends'. Depends are essential, Suggests are optional enhancers or accompaniments, Recommends not necessary. All three groups are installed by default in aptitude when installing a piece of software. You can configure aptitude to never install recommends to avoid bloat. To customise aptitude:

cd /etc (this is where settings files live) cd apt (within /etc) - a load of configuration files are in the apt folder, controlling how aptitude works. cat sources.list (opens the contents of sources.list in the terminal so you can read it) cd apt.conf.d (you're now in the apt.conf.d folder)

make a new file in this folder that tells aptitude not to install recommends: (working directory is apt.conf.d) nano aptitudeconfig (opens a new file, 'aptitudeconfig', with nano editor. (doesn't matter what you call it - numbered files tell system in what order to run them, but this file doesn't need a number))

The file simply needs to read: APT::Install-Recommends "false";

Ctrl + o to save Ctrl + x to exit


//Switching to unstable - to get funky new stuff

nano sources.list (opens file 'sources.list' so you can edit it- this lists the repositories where you can download software from.) Edit the lines replacing lenny with 'sid' - this is the unstable flavour of debian.

'main' at the end of each line means the main repository. add 'contrib non-free' before 'main' on each line to also get non-free software. After saving this file (Ctrl + o) and closing (Ctrl + X), run apt-get update. This will update your system according to your new sources list. Reboot - command is simply 'reboot'

//Cool software

lynx is an old text-based browser within the terminal G http://google.com - opens google.com


//intstalling from the ground up

Xorg is a basic layer under graphical interface. Install using aptitude, then run by typing 'X'. Gives you basic environment with just a terminal and a mouse. On its own it doesn't do much. Now, you need a window manager.

> window managers no desktop, but lets you open windows. you can install a package giving you a system tray if you like - eg 'trayer' evilwm - extremely minimal window manager, just one layer above command line interface dwm - similar to evilwm awesome - another minimal window manager. By defeault if one terminal is open, it uses the whole screen, then splits the screen as more windows are open. Also has a float mode, and you can have a system tray if you like. very customisable. it's derived from dwm, an older manager that is only customisable by editing the .config file openbox

>desktop managers/environments has a 'root window', or desktop, that is always there in the background. always comes with a window manager Gnome is a popular one, but bloated as it's designed to work in every situation for any user xfce - a bit lighter than gnome (used on PureDyne OS) lxde - very minimal, works on older machines

make file in home directory called .Xsession in the file type the name of the desktop/window manager you want it to run.


//configuring third-party repositories edit file /etc/apt/sources.list and insert lines with your chosen added repositories (search online for the URLS) for example, to add multimedia repository for non-free gakky goodness, you'll insert a line like this:

deb http://www.debian-multimedia.org squeeze main non-free

Anything from this repository will be listed in Aptitude with a 'U' meaning untrusted. To get rid of this warning, install the key of the repository.q


visudo - opens sudo config file so you can edit it.