linux basics
Linux
-Free as in speech.
-Has thousands of available programs.
-Stable and safe.
-Available in many different 'flavours', known as distributions.
-Distributions differ in target audience, lanugage, included programs, system administration...
-Package managment: programs (known as 'pakcages') are dependant on one another.
-Each part of the system is separate, so we don't really need a GUI (Graphical User Interface), useful on servers.
-Penguins are cool.
-Yes, they are.
Ubuntu
Good sides:
-Totaly free.
-User friendly.
-Good hardware compatability.
-Easy setup.
Bad sides:
-A bit slow, especially on older hardware.
-By default does not have most programming tools installed.
-Who the hell came up with the name? Humanity to others be damned, it just sounds weird.
Some basic graphical programs:
-Firefox, Kate, OpenOffice, The Gimp.
-Program installation: Synaptic.
Installing programs:
-APT (Advanced Packaging Tool):
-'apt-get install program' - installs 'program'
-extra options: --reinstall (apt-get --reinstall install foo), remove (apt-get remove foo), --purge (remove the program and all configuration files, apt-get --purge remove foo), -u upgrade (umm, let's see... oh, yes, upgrades programs).
-specific versions: 'apt-get install foo=1.3.3.7'
-search for programs: 'apt-cache search foo'
-more info about a package: 'apt-cache show foo'.
-Buy me a beer.
Console, terminal, ugly black box, ugly white box...
-Ubuntu, Kubuntu, Fluxbuntu, Xubuntu, blablabla, all use 'sudo' for system administration, other distros use 'su'. No, I don't feel like explaining the difference.
-Some of the more importaint files:
/etc/X11/xorg.conf
/etc/conf.d/net
/home/user/.foo (settings for the program foo)
Some basic console commands:
'ls' list
-extra arguments: -l (long), -t (by Time, no, not the magazine), -S (organised by size), -a (all, even shows hidden folders)
'cd' change dir
-'cd' goes to /home/user, 'cd...' goes up one folder, 'cd /' goes to the root folder, 'cd /blabla' goes to /blabla, 'cd blabla' goes to /where_we_are/blabla
'rm' remove
-Removes stuff. Who would have thought.
'cp' copy
- 'cp -arg what where', 'cp -R /home/user/stuff /home/user/oldstuff/stuff' -R means recursive
'mv' move
'mkdir' make directory
'touch' make new empty file
'cat' Makes a kitty cat jump out of the computer. No, just kidding, it shows the contents of a file. No, I
do not know why they didn't call it 'dog'.
'more' and 'less'
Remember: less is more than more. (example: cat long_log.txt | less), > adds text, >> adds and replaces
'chmod'
To change permissions. Syntax: chmod whoXperm file, 'who' can be u, g or o (user, group, owner), X is + or - to add or subtract permissions, perm is 'rwx', 'r--' (read, write, execute)
'kill'
When Angel Eyes is after you, you can use this command. 'kill' is the nice version (tells the program 'please die'), 'kill -9' is the evil version (shoot now, ask questions later kind of thing)
Usefull programs for the console:
-Midnight commander ('mc')
-Used to make midnight come and go. Works like Total Commander on that other operating system, use TAB to switch between window panes.
-Nano ('nano')
Simple text editor. Ctrl-x is exit, it will ask if you want to save. You can be weird and use Vi or
Emacs, but some of us have a life.
-Secure SHell ('ssh')
Works like telnet, but safer, used for remote console access to servers and such. Easiest way is to
use an IP number 'ssh 192.168.1.100'
-Screen ('screen')
-Adds virtual consoles to our console. So you can have virtual windows, and consoles in each of
the virtual windows, and virtual consoles in each of the consoles in each of the virtual windows,
and virtual consoles in each of the virtual consoles in each of the consoles of each of the virutal
windows, and oh god will this ever end, no, in fact it won't...
-basic three commands: 'screen -ls' list, 'screen -R' reattach, ctrl-a d (exit)
-Top and Pstree ('top' and 'pstree')
Show running programs so we can kill the suckers.
Other useful programs:
-Tar
-Lynx, Links,
-Fortune
-Cmatrix
-Uname -a (sys info)
-Zed (editor), Oleo (excel in a console), Pine, Mutt (both email clients), Tpp (console powerpoint), Antiword (changes .doc into something normal), Irssi (IRC), ImageMagic (graphic tools), cursetheweather (weather info)
Scripts:
Start with #!/bin/bash, sometimes #!/usr/bin/env python
Subversion:
GUIs: kdesvn, subcommander
in the console:
to create a repository:
svnadmin create --fs-type=fsfs<nobr> <wbr></nobr>/data/SvnRepository
(creates a new repository at /data/SvnRepository)
to import documents into the repository:
svn import . file:///data/SvnRepository/ProjectDocs
(you'll get an editor where you enter a description of the directory, when you save all ProjectDocs will be copied into the subversion repository)
you need to convert the docs and checkout a working copy:
svn co file:///data/SvnRepository/ProjectDocs ProjectDocs
When we make changes to one of the files in the ProjectDocs directory, we can commit them back to the Subversion repository: 'svn commit' while in the directory
To create a new file in the ProjectDocs directory, do 'svn add Foo.doc'
To see a log: 'svn log Foo.doc'
To get an older revision: svn update -r 6 Foo.doc
