Linux: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
m (growing pains)
No edit summary
(27 intermediate revisions by 12 users not shown)
Line 1: Line 1:
            :ZZZNNNNNNNZZZ:            
[[Category:linux]]
        ZZNNNZZZZNZNNZZZNNNZZ         
[[Category:events]]
      ZZNZZZZZZZZZZZZZZZNNZZNZZ       
    ZZNZZZZZZZZZZZZZZZZZZNDZZONZZ     
    ZNOZZZZZZZZZZZNNDZZZZZZZZZZZONZ   
  ZNZZZZZZZZZZZNNZZZNZZZZZZZZZNOZNZ
  ZNZZZZZZZNNNNNNZZZZZNNNNNZZZZZZZZNZ
ZNZZZZZZZNNZZZZZZZZZZZZZZZNZZZZZZZZNZ 
ZNZZZZZZZN8ZZZZZZZZZZZZZZZNZZZZZZZZNZ 


'''Linux Resources for you at the space'''
[[Image:Asciibridge.PNG|right|alt="Only as good as you make it"]]
==Weekly and One-off Events==
If you are unsure of whether a class is meeting be sure to check the Noisebridge Announce and Discuss Lists.


ZNNOZZZZZN8ZZZZZNNNNNZZZZZNZZZZZZZZNZ 
==Tuesdays==
ZNNNZZZZZNNZZZZNZZZZNNZZZZNZZZZZZZZNZ 
15:00 - 16:30 [[Linux_System_Administration_Study_Group|System Administrator Study Group]]
  ZNNDZZZZZZNNNNNZZZZZNNNNNZZZZZZZNNZ 
  ZNNN8NZZZZZZZZZZZZZZZZZZZZZZZZDNZ   
    ZNNNZ8ZZZZZZZZZZZZZZZZZZZZZZZNZ   
    ZZNNNZZZZZZZZZZZZZZZZZZZNZNZZ     
      ZZNNNNZZZ8ZZZZZZZZZZOZNZZ       
        ZZNNNNNNNN8ZZNZ8NNNZZ         
            ~ZZZNNNNNNNZZZ~
==Class and related MeetUp Listings==
* Linux Discussion
* 101 Intro Class: No question is too stupid!
* System Administrator Study Group
===Unix/Linux Study===
File Permissions


Introducing the latest completely unnecessary, but excellent addition to the Linux Study Group.  A few of us, starting 2/22/2012, are exploring a specific topic as deeply as possible.  Once those willingly put themselves through this torture reach a proper saturation point, we'll move onto something else.  We're starting with something very basic, but endlessly frustrating: File Permissions.
16:30 - 18:30 [[C_and_assembler_on_Linux|C and the Assembler on Linux]]
Just hearing those words might have you grinding your teeth.  Good.  Get studying!


How can you make this actually productive?
18:30 - 20:00 [[Linux.BSD.UNIX Open Learning and Hacking in Turing]]: Hands-on learning. Feel free to come early if you might need extra assistance.  No experience necessary or expected.


1Take your timeThere is no deadline for understanding.
==Wednesdays==
18:00 - 20:00 [[LinuxDiscussion|Linux Discussion]]
==To Be Decided==
System Recovery (Fie: Failure is Eminent)
  Devoted to recovery and backups of DataEither weekly or bi-monthly.
  Your system recovery plight put to the test! Not sure whether this is a class, a roving group activity, or
  just a straight challenge.  If you don't have any form of recovery, perhaps this will inspire you to do so.
  Will probably open this up to the internet communities at large if it goes well for the space.


2. Record your research; copy links and anything else to a txt file or e-mail.
  Considerations:
  *Data: Files, partitions, drives, operating systems, non-unix
  *Privacy: Local area network, encryption schemes
  *Architecture: Portability and dependencies
  *Interactivity: gui? web? cron? output?
  *Scripts and existing tools
  *Cleanliness of code and notation
  *Create a web flyer


3.  Share your findings with others.  The easiest way to do is this by hosting your findings on your own server or a free wordpress account.  I do not recommend posting directly to this wiki as someone could easily delete it.
=Bash= for Noisebridge SysAdmin Class
Start playing with Bash Scripting by using the following tools:


4Study books freely available in our library to practice or quiz yourself.
==Github==
[https://github.com/ Github] is a good place to start connecting with the majority of active Git users/coders who are willing to collaborate with youAccounts are free and provide the best option for learning Git outside of class and our usual terminal interface
'''Note:''' Of course, nothing is stopping you from just ssh'ing into Github like you usually would.


Examples of what you should master (please expand this):
1.  Create a repository and readme.
2.  Upload a file.
3.  Search for code you like or could improve.
4.  Fork something someone poorly wrote, improve it, and push it back to them.


User Group Other
This will give you the basic, visual understanding of how version control works and why we use it.


rwx..x..x
==Pastebins==
[http://pastebin.com/ Pastebins] are where you should always post your code rather than writing it by hand, which is sloppy and error prone. Plenty of Pastebins include syntax highlighting where you'll be able to fix common errors just by realizing you forgot a closing paren or double quote. [https://gist.github.com/ Gist] is a pastebin provided directly by Github.  The paranoid types can find plenty of secure options via google searches.


Chown
==Common use of pipes in Linux==
This example is for looking for specific installed packages and applications on your system.


Chgrp
$ apt-cache search linux


711 vs. +x
Returns a lot of stuff


Processes
$ apt-cache search linux |more


Sudoers
Allows you to see 'linux' Debian packages gradually using the 'more' pager
 
$ apt-cache search linux |more |grep 'kernel' --color=auto
 
Allows you to gradually see 'linux' Debian packages associated with the term 'kernel' which will be highlighted.
 
$ apt-cache search linux |more |grep 'kernel' --color=auto| sort -M
 
Allows you to gradually read 'linux' Debian packages associated with the term 'kernel' after it is sorted by timestamp.  Notice how the highlighting is gone?  Anything else missing as we get more specific?
 
==Basic Commands for Bash Scripts==
Feel free to expand this with ones you find helpful as well for basic bash programming
 
sleep (number of seconds)
 
$ sleep 2
 
Print a blank line for readability and double spacing
 
$ echo -e "\n"
 
$ printf "\n"
 
Clear the screen of output
 
$ clear
 
==Building Linux from source code on Debian-based GNU/Linux systems==
# Get the build requirements:
#: <code>su -c 'apt-get install build-essential libncurses5-dev'</code>
#: or
#: <code>sudo apt-get install build-essential libncurses5-dev</code>
# Download the Linux source code from the [http://www.fsfla.org/svnwiki/selibre/linux-libre/ Linux-libre project]. The source tarballs from kernel.org should be avoided if possible, because it includes proprietary binary blobs.
#: <code>http://www.linux-libre.fsfla.org/pub/linux-libre/releases/3.4.8-gnu/linux-libre-3.4.8-gnu.tar.bz2</code>
# Extract the source archive:
#: <code>tar xf linux-libre-3.4.2-gnu.tar.bz2</code>
# Enter the directory with the extracted source code (and make edits to the source if you wish):
#: <code>cd linux-3.4.2</code>
# Create or edit the build config file:
#: <code>make menuconfig</code>
# Build the kernel and package it into deb files (if you don't intend on debugging, set the INSTALL_MOD_STRIP variable to 1 to remove the debugging symbols):
#: <code>INSTALL_MOD_STRIP=1 make deb-pkg</code>
#: (This step can take several hours, depending on the machine you're building it on.)
# Go up one directory:
#: <code>cd ..</code>
# Install the deb package files you created:
#: <code>su -c 'dpkg -i linux-*.deb'</code>
#: or
#: <code>sudo dpkg -i linux-*.deb</code>
# Reboot to load your new kernel:
#: <code>su -c 'shutdown -r now'</code>
#: or
#: <code>sudo shutdown -r now</code>
 
=Suggestions for Improving this Section=
This wiki is build on Mediawiki.  I highly recommend installing a USB version of it or something like so you can edit, expand, and this page while offline.  Thanks!
 
Include photos and descriptions of community linux machines, live cd's, and other relevant things at nb.
 
Should [[Android]] get talked about here as well?
 
Add section on testing old hardware.
 
Add links to Noisebridge coding efforts and related dev classes

Revision as of 12:39, 9 December 2012


"Only as good as you make it"

Weekly and One-off Events

If you are unsure of whether a class is meeting be sure to check the Noisebridge Announce and Discuss Lists.

Tuesdays

15:00 - 16:30 System Administrator Study Group

16:30 - 18:30 C and the Assembler on Linux

18:30 - 20:00 Linux.BSD.UNIX Open Learning and Hacking in Turing: Hands-on learning. Feel free to come early if you might need extra assistance. No experience necessary or expected.

Wednesdays

18:00 - 20:00 Linux Discussion

To Be Decided

System Recovery (Fie: Failure is Eminent)

 Devoted to recovery and backups of Data.  Either weekly or bi-monthly.
 Your system recovery plight put to the test!  Not sure whether this is a class, a roving group activity, or 
 just a straight challenge.  If you don't have any form of recovery, perhaps this will inspire you to do so. 
 Will probably open this up to the internet communities at large if it goes well for the space.
 Considerations:
 *Data: Files, partitions, drives, operating systems, non-unix
 *Privacy:  Local area network, encryption schemes
 *Architecture: Portability and dependencies
 *Interactivity: gui? web? cron? output?
 *Scripts and existing tools
 *Cleanliness of code and notation
 *Create a web flyer

=Bash= for Noisebridge SysAdmin Class Start playing with Bash Scripting by using the following tools:

Github

Github is a good place to start connecting with the majority of active Git users/coders who are willing to collaborate with you. Accounts are free and provide the best option for learning Git outside of class and our usual terminal interface Note: Of course, nothing is stopping you from just ssh'ing into Github like you usually would.

1. Create a repository and readme. 2. Upload a file. 3. Search for code you like or could improve. 4. Fork something someone poorly wrote, improve it, and push it back to them.

This will give you the basic, visual understanding of how version control works and why we use it.

Pastebins

Pastebins are where you should always post your code rather than writing it by hand, which is sloppy and error prone. Plenty of Pastebins include syntax highlighting where you'll be able to fix common errors just by realizing you forgot a closing paren or double quote. Gist is a pastebin provided directly by Github. The paranoid types can find plenty of secure options via google searches.

Common use of pipes in Linux

This example is for looking for specific installed packages and applications on your system.

$ apt-cache search linux

Returns a lot of stuff

$ apt-cache search linux |more

Allows you to see 'linux' Debian packages gradually using the 'more' pager

$ apt-cache search linux |more |grep 'kernel' --color=auto

Allows you to gradually see 'linux' Debian packages associated with the term 'kernel' which will be highlighted.

$ apt-cache search linux |more |grep 'kernel' --color=auto| sort -M

Allows you to gradually read 'linux' Debian packages associated with the term 'kernel' after it is sorted by timestamp. Notice how the highlighting is gone? Anything else missing as we get more specific?

Basic Commands for Bash Scripts

Feel free to expand this with ones you find helpful as well for basic bash programming

sleep (number of seconds)

$ sleep 2

Print a blank line for readability and double spacing

$ echo -e "\n"
$ printf "\n"

Clear the screen of output

$ clear

Building Linux from source code on Debian-based GNU/Linux systems

  1. Get the build requirements:
    su -c 'apt-get install build-essential libncurses5-dev'
    or
    sudo apt-get install build-essential libncurses5-dev
  2. Download the Linux source code from the Linux-libre project. The source tarballs from kernel.org should be avoided if possible, because it includes proprietary binary blobs.
    http://www.linux-libre.fsfla.org/pub/linux-libre/releases/3.4.8-gnu/linux-libre-3.4.8-gnu.tar.bz2
  3. Extract the source archive:
    tar xf linux-libre-3.4.2-gnu.tar.bz2
  4. Enter the directory with the extracted source code (and make edits to the source if you wish):
    cd linux-3.4.2
  5. Create or edit the build config file:
    make menuconfig
  6. Build the kernel and package it into deb files (if you don't intend on debugging, set the INSTALL_MOD_STRIP variable to 1 to remove the debugging symbols):
    INSTALL_MOD_STRIP=1 make deb-pkg
    (This step can take several hours, depending on the machine you're building it on.)
  7. Go up one directory:
    cd ..
  8. Install the deb package files you created:
    su -c 'dpkg -i linux-*.deb'
    or
    sudo dpkg -i linux-*.deb
  9. Reboot to load your new kernel:
    su -c 'shutdown -r now'
    or
    sudo shutdown -r now

Suggestions for Improving this Section

This wiki is build on Mediawiki. I highly recommend installing a USB version of it or something like so you can edit, expand, and this page while offline. Thanks!

Include photos and descriptions of community linux machines, live cd's, and other relevant things at nb.

Should Android get talked about here as well?

Add section on testing old hardware.

Add links to Noisebridge coding efforts and related dev classes