.

I can go on ad nausem about Linux and many thick books do rightfully do so.
The intent is to brief you up to speed very vey fast.

About

This is the “garage hacker” that is putting Microsoft out of a job. He is charge of kernel code. He works at the Linux Foundation.

He lives in Sve-den, ja?

-“This is Linus Torvaldis and I pronouce-a Linux Linux…” Audio

ALL HAIL the master penguin!!

Withou him, this conversation would not have taken place.

:-)

What is Linux? In his own words:

(see kernel source package) “ Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net.

It aims towards POSIX and Single UNIX Specification compliance.

It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write(COW/QEMU/PC emulation) executables, proper memory management, and multistack networking including IPv4 and IPv6.

It is distributed under the GNU General Public License. “

Whats in a distro,eh?

The only thing in a distro is a source (repository) of packages stacked and layered upon Desktop Environments(DE), stacked upon the kernel.

The HOW and WHY and WHO did what to the default setup is what makes these different.

Linux Crash Course

WHA? NAH! NO WHEY!

WHEY MIX! Here is the CHEET SHEET. Grandpa Jazz always said that theres always a CHEET SHEET …you just have to know where to look.

“Learn UNIX in 10 minutes. Version 1.4”
[Copyright and borrowed from freengineer.org under GFDL. Edits by this site’s owner.]

This was mass edited. The guide over at Linux-Command should suffice for most users. It is far simpler to understand. Save that eitire website if you must.

Sections:

Viewing and editing files

Environment variables

Interactive History

Filename Completion

Pipes

Command Substitution

Searching for strings in files: The grep command

Searching for files : The find command

Reading and writing tapes, backups, and archives: The tar command

File compression: compress, gzip, and bzip2

Looking for help: The man and info commands

FAQs

Viewing and editing files:

	cat filename 

Dump a file to the screen in ascii.

	more filename 

Progressively dump a file to the screen: ENTER = one line down SPACEBAR = page down q=quit

	less filename 

Like more, but you can use Page-Up too.

	nano filename 

Edit a file using the nano editor. Most modern systems have nano. ‘Apt-get install’ it if not.

	emacs filename 

Edit a file using the emacs editor. Not all systems will have emacs.

	head filename 

Show the first few lines of a file.

	head -n filename 

Show the first n lines of a file.

	tail filename 

Show the last few lines of a file.

	tail -n filename 

Show the last n lines of a file.

Environment variables

You can teach your shell to remember things for later using environment variables. For example under the bash shell:

export CASROOT=/usr/local/CAS3.0 Defines the variable CASROOT with the value /usr/local/CAS3.0.

export LD_LIBRARY_PATH=$CASROOT/Linux/lib Defines the variable LD_LIBRARY_PATH with the value of CASROOT with /Linux/lib appended.

By prefixing $ to the variable name, you can evaluate it in any command:

cd $CASROOT Changes your present working directory to the value of CASROOT

echo $CASROOT Prints out the value of CASROOT, or /usr/local/CAS3.0

printenv CASROOT Does the same thing in bash and some other shells.

Interactive History

A feature of bash and tcsh (and sometimes others) you can use the up-arrow keys to access your previous commands, edit them, and re-execute them. [Like doskey app does]

SECRET:
!! retypes the last command given

as-in:
sudo !! (you forgot to be root)

Filename Completion

A feature of bash and tcsh (and possibly others) you can use the TAB key to complete a partially typed filename. For example if you have a file called constantine-monks-and-willy-wonka.txt in your directory and want to edit it you can type ‘vi const’, hit the TAB key, and the shell will fill in the rest of the name for you (provided the completion is unique).

*This doesnt always work.

Bash

Bash will even complete the name of commands and environment variables. And if there are multiple completions, if you hit TAB twice bash will show you all the completions. Bash is the default user shell for most Linux systems.

Redirection:

grep string filename > newfile Redirects the output of the above grep command to a file ‘newfile’.

grep string filename >> existfile Appends the output of the grep command to the end of ‘existfile’.

The redirection directives, > and >> can be used on the output of most commands to direct their output to a file.

Pipes:

The pipe symbol “|” is used to direct the output of one command to the input of another.

For example:

ls -l | more This commands takes the output of the long format directory list command “ls -l” and pipes it through the more command (also known as a filter).

In this case a very long list of files can be viewed a page at a time.

du -sc * | sort -n | tail The command “du -sc” lists the sizes of all files and directories in the current working directory. That is piped through “sort -n” which orders the output from smallest to largest size. Finally, that output is piped through “tail” which displays only the last few (which just happen to be the largest) results.

Command Substitution

You can use the output of one command as an input to another command in another way called command substitution. Command substitution is invoked when by enclosing the substituted command in backwards single quotes. For example:

cat find . -name aaa.txt

which will cat ( dump to the screen ) all the files named aaa.txt that exist in the current directory or in any subdirectory tree.

‘cat’ is the linux ‘type’ command.

Searching for strings in files: The grep command

grep string filename prints all the lines in a file that contain the string

Searching for files : The find command

find search_path -name filename

find . -name aaa.txt Finds all the files named aaa.txt in the current directory or any subdirectory tree.

find / -name vimrc Find all the files named ‘vimrc’ anywhere on the system. find /usr/local/games -name “xpilot” Find all files whose names contain the string ‘xpilot’ which exist within the ‘/usr/local/games’ directory tree.

Reading and writing tapes, backups, and archives: The tar command

The tar command stands for “tape archive”. It is the “standard” way to read and write archives (collections of files and whole directory trees).

Often you will find archives of stuff with names like stuff.tar, or stuff.tar.gz. This is stuff in a tar archive, and stuff in a tar archive which has been compressed using the gzip compression program respectivly.

TAPE==TAR

TAR is dated. You have opticals. USE DAR.

File compression: gzip, and bzip2

A common compression utility is gzip (and gunzip). The suffix for gzipped files is .gz

gzip part.igs Creates a compressed file part.igs.gz

gunzip part.igs Extracts the original file from part.igs.gz

The bzip2 utility has (in general) even better compression than gzip, but at the cost of longer times to compress and uncompress the files.

bzip2 part.igs Create a compressed Igs file part.igs.bz2

bunzip2 part.igs.bz2 Uncompress the compressed igs file.

-or simply use the tar -j option-

Looking for help: The man and info commands

Most of the commands have a manual page which give sometimes useful, often more or less detailed, sometimes cryptic and unfathomable discriptions of their usage. Some say they are called man pages because they are only for real men.

Example:

man ls Shows the manual page for the ls command

You can search through the man pages using apropos

Example:

info build Shows a list of all the man pages whose discriptions contain the word “build”

Do a man info for detailed help on info.

FAQs

USENET?

Showing my age here…USENET and BBSes have long long been dismantled and taken down.

The USENET (Google Group) FAQs should be the first place you look for an answer to specific questions.

google.com has a USENET archive (formerly Deja.com’s) Advanced Group Search

Original source Copyright (c) 2000-2006
“Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation.”

A copy of the license can be found on the GNU web site here.

Disapointments

Many a times I have commented about Linux’s moments of sad state.

LOADS of people are saying SECURE THIS and THAT.

GRSECURITY? EPICFAIL.
Kernel recompile? EPICFAIL.
Proprietary drivers? NOT ON MY WATCH! FAIL.
SELinux. EPICFAIL.
AppArmor. EPICFAIL.
Dar SECURE backups. FAIL. (HACK-JOB partial implementation)

Does ANYBODY GIVE A SHIT about this? NO.

EPIC-FAIL.

Your code is vulnerable in more ways that you can think of. Kernel code, moreso. Fine if you can harden it, but that cant do enough if the SYSTEM is VULNERABLE and EXPLOITABLE.

Jail your email client and browsers. DONT RISK IT.
And avoid unsigned code if at ALL possible.

I encourage enforcement of GPLv2 and backported solutions to real-world problems for the community(cross-distro) as a whole.

I openly WELCOME and encourage open solutions to proprietary-ness and binary blobs.

That said:

Linux is having another SAD SAD SAAD Day in history.
Almost EVERY Linux distro worth my time(and yours) is hitting a brick wall as of late.

You are having freedom forced on you.
Im all FOR freedom, but if I want non-free, then so be it.

ITS MY CHOICE!
Dont force it on me.

The very fact that WINE forces you to use the open OpenCL(yes, thats not a typo) driver to install the package is shameful. If I decide to install the proprietary version, WINE should use it. I guess this is a clusterfuck but is only half right. Im using OpenCL and clinfo is given with CATALYST…

Officially, wine force-removes OPENCL and installs its own, breaking OpenCL in the process.

If I wanted to coin mine(via OpenCL) I could not do it because of this.

The fact that this bug has persisted for many a years is mind-blowing.
And Ive encountered issues in the past where the same applied to the libOpenGL files also.

Yes, MESA fucking up or getting overridden.

BIG BIG NO NO.

HEY! BAFOON! Thats my 3D RENDERING YOU OAF!

ATI cards for YEARS have lousy claims of piss poor performance. Those elusive 1K-3K fps? YEP. Possible. I have HIT 5K on a single 7850 Radeon.

But NOBODY seems to care….BREAK the video driver!

This isnt a “this is debian, we dont track that” issue.

Its a “we know there are problems but we dont bother reporting them to the PROPER channels” problem.
Or its a “we dont bother to actually fix things upstream” problem.

Neither situation is good for Linux.

My bug reports(some are seeing light of day finally..) on security of Debian are prime example.
The package teams want YOU to do all of THIER work.

I remember kernels giving me hell in the past as well.

CRIPPLED seems to be the new norm.

FEDORA had this issue with 21 and Not-So-OpenSSL… I think I gave them enough “what for” that they bent over sideways and said eff it.

You have influence, you just have to gang up on people and demand they do the right thing.

NOBODY likes a FLASH MOB.
NOBODY.

And how many other apps are going to follow suit?
Skype seems to want to break and be outdated all of a sudden…

I love ekiga to death, but Id rather Skype.

Firefox/Iceweasel ‘hello’? Its a bit new for me.
And I dont think the protocol is very secure. It leaks.

-Speaking of MOZ….

plugins: Im not securing your browser (or habits) on MY watch! OH NO! Heaven forbid…. BUT there is a way to do it EN MASS, repeatable browseer lockdown for the corporate Lin-Lan(or enterprise in general).

-I have found the way.

MOZILLA WONT TELL YOU THIS SECRET!

Configure Foxie how you like him. -You have to copy BOTH profile folders over on SIN. (local and roaming) to the next machine.
Then launch via -P… Delete the old profile and done.

Linux broken this week:

	banshee and songbird(gstreamer calling is off)
	reportbug hell with gmail and yahoo (2FA and remote IP monitoring when accessing services glitch)
	xarchiver (fails as LXDE file zipper)
	PEAZIP [for the love of GOD!] (fails to zip files also)
	Kompozer [dreamweaver clone] (depends hell- too dated a library required to run it, like skype)

Can you find more breakage?
Lets bitch up a storm.

Dont try this at home

…it simply wont work.

These commands are DUD on ARRIVAL.

IE: USER ERROR as documented.

cpp (there is no cpc, cp is the linux copy command. IE: no TUI for C)

pv[progress transfer status]

piped dd thru pv (dd if=infile |pv| of=outfile)

cv

The use of cv and pv utils is otherwise correct and these utilities need the info piped thru them, however, in practice dont seem to work.

There are other commands, and I will post as I find them.

The C Compiler( O NO! NOT THAT! NEVER THAT! Breakage THERE? ):

The C (pre) compiler (cpp/gcc) needs an input file, and stutters without one. There doesnt seem to be a Borland C TUI(text interface) application on Linux-es.

FreePascal uses the old Borland protocol syntax and inherits its TUI from there, notably, fp being the interface UI and fpc the standalone compiler.

‘cp’ is the unix filesystem copy command. (what is this the 1960s?)

-You see the problem..you cant just rename the application. You need a whole new naming scheme.