CLI class

63 views
Skip to first unread message

Richard Frankum

unread,
Sep 19, 2012, 9:33:35 PM9/19/12
to tokyohac...@googlegroups.com
Hi,

So following up from MRE's post on the "what I want to learn" page:
http://quake.tokyohackerspace.org/index.php/I_Want_to_Learn_This

I'll be leading a discussion of the Linux CLI on next next Weds.
http://www.tokyohackerspace.org/ja/event/2012-10-03-introduction-to-the-command-line

I expect it to be hands-on, so bring your laptop with an appropriate distro.

--
--Richard Frankum

Jud Taylor

unread,
Sep 19, 2012, 9:49:44 PM9/19/12
to tokyohac...@googlegroups.com
I apparently have no account allowing me to edit the wiki.

Could I please have one?

Thanks,

Jud
> --
> You received this message because you are subscribed to the Google Groups "TokyoHackerSpace" group.
> To post to this group, send email to tokyohac...@googlegroups.com.
> To unsubscribe from this group, send email to tokyohackerspa...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tokyohackerspace?hl=en.
>

Richard Frankum

unread,
Sep 19, 2012, 9:52:19 PM9/19/12
to tokyohac...@googlegroups.com
Sure. Give me a username and password and I'll set you up.

--Richard
--
--Richard Frankum

Luis Felipe RM

unread,
Sep 20, 2012, 6:12:46 AM9/20/12
to tokyohac...@googlegroups.com
On 09/19/2012 06:33 PM, Richard Frankum wrote:
> I'll be leading a discussion of the Linux CLI on next next Weds.
> http://www.tokyohackerspace.org/ja/event/2012-10-03-introduction-to-the-command-line

I would love to help with this, Richard.
You can count on me for certain!

I could help setting up Linux/BSD machines for the event; although, in
this day and age, even those who do not care have a shell available for
them, hidden under -> Applications -> Utilities :-)

Torsten Wagner

unread,
Sep 20, 2012, 7:33:18 AM9/20/12
to tokyohac...@googlegroups.com
Hi,

instead of setting up PCs, we could create a THS Linux USB stick.
I did one once based on Arch Linux...
Not a live CD thing, a real installation which allows you to install
new software and save data.
Those sticks could contain the Arduino IDE, Processing IDE, LaTeX,
other uC IDEs or compilers (Propeller GCC, MSP430 GCC, etc.)
Documentations, 3D Printer software, Eagle(not sure about licence
issuses), Kicad, Inkscape, LibreOffice, etc. etc. etc.
Basically all you would need to create a THS class. Working on a
main-branch and simply copy images over to other sticks would allow us
to keep all the stuff in sync.

People could come with there own laptops, stick the USB dongle in and
volia everything is ready and set-up for the class. Well, in theory...
there might be quirks like non-working video drivers or other probs on
one or the other machine but Linux is really getting good in hardware
prediction. I would say it would run on > 95% of all laptops.

The sticks could boot into full graphical mode and hence would be very
beginners friendly.
If the stick works out well and easy, THS could start selling
copies.... the THS-hacker stick....

Totti

CC. This is, lets create a own usb-based installation not an own
distro... there are so many to choose from no need to do a own. Go
with one which works nice on older machines
Arch Linux, Debian, Xubuntu, if you want to go Enterprise maybe CentOS.

AbH Belxjander Draconis Serechai

unread,
Sep 20, 2012, 7:47:15 AM9/20/12
to tokyohac...@googlegroups.com

If the space will build such a USB stick
I can help but would need ssh access

My own sam440flex machine currently runs AmigaOS 4.1u5 and would be good for fpga hackery

Any chance for help getting gentoo booting on the partition set aside for linux?

MRE

unread,
Sep 20, 2012, 9:47:14 AM9/20/12
to tokyohac...@googlegroups.com
Love the USB memory stick idea

I run Windows 7, but will be doing linuxish stuff on a Chumby hackerboard via terminal.

And.. would love to see the sam board some day.

Richard Frankum

unread,
Sep 20, 2012, 9:12:00 PM9/20/12
to tokyohac...@googlegroups.com
On Thu, Sep 20, 2012 at 10:47 PM, MRE <epre...@gmail.com> wrote:
> Love the USB memory stick idea
>
> I run Windows 7, but will be doing linuxish stuff on a Chumby hackerboard
> via terminal.

Um. Good to know. Probably means some of what I'll cover in the class
won't be usable for you. Do you know if the Chumby actually runs a
Linux-style shell?

--
--Richard Frankum

Benjamin Davis

unread,
Sep 20, 2012, 9:21:33 PM9/20/12
to tokyohac...@googlegroups.com
All this stuff applies to Terminal in Mac OSX as is, yeah?

Torsten Wagner

unread,
Sep 20, 2012, 9:23:13 PM9/20/12
to tokyohac...@googlegroups.com
Hi,
All Linux gadgets (at least the one I know) run a sort of Linux like shell...
that is where all the fun and pleasure comes from ;)
SSH is one of the reasons people like to learn CLI....
Using / or plan to use a Chumby board, a R-Pi, Beagle board, etc. is
almost always about working on the CLI over SSH.
Sure you can install X and use a video output, but most of the config
stuff on embedded boards do not have a GUI equivalent. Its all about
editing files and copy and move files around making symlinks, unpack
files, compile them, etc. etc.

Thus, CLI is your best friend

I would love to see a class about Linux booting process esp. for
embedded systems. Bootloaders, Kernel command line config, Initrd,
Runlevels,
Esp. the very first few steps before the Linux kernel gets up.

Totti

Richard Frankum

unread,
Sep 20, 2012, 9:30:14 PM9/20/12
to tokyohac...@googlegroups.com
On Fri, Sep 21, 2012 at 10:23 AM, Torsten Wagner
<torsten...@gmail.com> wrote:
> Hi,
> All Linux gadgets (at least the one I know) run a sort of Linux like shell...

Right. Then the question would be *which* sort of Linux like shell.
I'm planning to cover background jobs, I/O redirection, autocomplete,
etc. If the Chumby board doesn't support these, MRE will have to
reevaluate how he writes his "I want to learn this" lines in support
of his actual goals.

> I would love to see a class about Linux booting process esp. for
> embedded systems. Bootloaders, Kernel command line config, Initrd,
> Runlevels,
> Esp. the very first few steps before the Linux kernel gets up.

Awesome. Add it to the wiki!
(with the mandatory apology for account reset hassles. Patience is the
watchword!)

> Totti

--
--Richard Frankum

Torsten Wagner

unread,
Sep 20, 2012, 9:31:30 PM9/20/12
to tokyohac...@googlegroups.com
Not all, blame Mac OSX ;)
Both Linux and Mac OSX use good old Unix as archetype.
They share many common stuff on the CLI. Would think that all the
normal standard stuff might be the same. However, they might differ
when it comes to command parameteres and as far as I know Mac tries to
give you as less as possible whereas Linux gives you all....

Another alternative for the Mac and Windows fan-boys. Go and install
Virtualbox and a recent Version of a Linux distro. That allows you to
play with Linux without kiling or even touching anything else on your
PC/Mac. Even the infamous "sudo rm -rf /" would do no harm to your
real installation.
Might be a good way to learn about CLI. Remember CLI expect that the
users knows what he is doing, it does not ask you twice. If you tell
him to delete the files and press enter.... its gone. No Carl the
Paperclip pops up to ask again.
However, since a few years some really evil nasty commands start to
ask again for permission ;)

Totti

On 21 September 2012 10:21, Benjamin Davis <davis.be...@gmail.com> wrote:
> All this stuff applies to Terminal in Mac OSX as is, yeah?
>

Richard Frankum

unread,
Sep 20, 2012, 9:38:49 PM9/20/12
to tokyohac...@googlegroups.com
On Fri, Sep 21, 2012 at 10:21 AM, Benjamin Davis
<davis.be...@gmail.com> wrote:
> All this stuff applies to Terminal in Mac OSX as is, yeah?

Yeah.
As far as I can tell, anyway. Apparently OSX uses the bash shell, so
there shouldn't be a problem. If you find a surprise in the middle of
the class, please tell me.
If Totti's right and the command parameters have changed... Shouldn't
be too much different for the basics. I imagine shell scripting would
require some reference, but I won't get that far.

--
--Richard Frankum

Torsten Wagner

unread,
Sep 20, 2012, 9:46:06 PM9/20/12
to tokyohac...@googlegroups.com
Hey Richard,
I would say 90% runs the Bourne shell (sh) with a bit of luck you get
bash the Born again Bourne shell ;)
Something else to consider beside of the shell is the fact that
embedded systems often use a smaller set of standard CLI tools.
Esp. in the embedded world, many use busybox, a collection of the most
common CLI tools in a single file.

http://spblinux.de/2.0/doc/commands.html

However, this commands does slightly differ from there counterparts on
bigger distros. 99% of the time you would not even notice. Only if you
go to use very exotic command parameters you might face the problem
that they do not work.

Totti

Nava Whiteford

unread,
Sep 20, 2012, 9:49:59 PM9/20/12
to tokyohac...@googlegroups.com
bash, but BSD tools. So, as you probably already know, for example:

ls *.png -l # gives a long list on Linux, but not BSD.
ls -l *.png # works on both

There are a few little things like that.

Torsten Wagner

unread,
Sep 20, 2012, 10:05:29 PM9/20/12
to tokyohac...@googlegroups.com
Ohh didn't know they use the BSD tools
I never really used Mac. Recently I came to the conclusion that a
Linux User might be more happy to use Mac rather then a PC if he is
forced to take one of both.
If Apple wouldn't be so evil and constantly customer bashing... I
would even try a Mac System to see how much I could go on with it
without feeling to much taken away.
Just read... the new Iphone 5 manufacture cost is about $217 that is
$209 for materials and f*cking crazy unbelievable, insane, and sad $8
to make Chinese slaves in giant factories setting all pieces
together... take this in mind when you line up for your $650 new
gadget Apple fan boys. And take the money for disposing all your "old
" iphone <5 equipment into account ;)


Totti


That makes another point on the wiki list...
Learn OpenBSD and Co.... and how do they differ from Linux

Luis Felipe RM

unread,
Sep 20, 2012, 10:46:28 PM9/20/12
to tokyohac...@googlegroups.com
On 09/20/2012 06:23 PM, Torsten Wagner wrote:
> Hi,
> All Linux gadgets (at least the one I know) run a sort of Linux like shell...
> that is where all the fun and pleasure comes from ;)
> SSH is one of the reasons people like to learn CLI....
> Using / or plan to use a Chumby board, a R-Pi, Beagle board, etc. is
> almost always about working on the CLI over SSH.

that could be an idea... I will bring the Pi, and people can access it
via SSH for the class.

> Sure you can install X and use a video output, but most of the config
> stuff on embedded boards do not have a GUI equivalent. Its all about
> editing files and copy and move files around making symlinks, unpack
> files, compile them, etc. etc.
>
> Thus, CLI is your best friend
>
> I would love to see a class about Linux booting process esp. for
> embedded systems. Bootloaders, Kernel command line config, Initrd,
> Runlevels,

I talked to Taylan and MRE about setting up a study group for embedded
linux, we would study the machines we have available now: pi and chumby
(and pogoboard).

MRE

unread,
Sep 21, 2012, 5:38:41 AM9/21/12
to tokyohac...@googlegroups.com
Chumby runs busybox.
Already have cli access.. although not sure the flavor.

Ssh?? No way. TTL serial all the way!!
(Chumby has no net connection. But I do have a wire dongly already checked out ob it. Next is an old wifi dongle.)

MRE

unread,
Sep 21, 2012, 5:47:58 AM9/21/12
to tokyohac...@googlegroups.com
Specifically:
1 - how to probe hardware and get it running. Such as usb devices like net dongles. Ftdi adaptors.

2 - make settings perm so hardware is up on boot.

3 - execute scripts and applications automatically after boot completes.

4 - how to pipe data from serial port to files, scripts and c programs.

5 - the basics of available text editor included with chumby

I dont expect much of that in your initial cli class.. just a getting started with linux sort of deal.

And, chris s was doing this class for a short time.. perhaps you can switch out?
6 - eventually, how to write and compile c programs on it.

Richard Frankum

unread,
Sep 21, 2012, 6:02:39 AM9/21/12
to tokyohac...@googlegroups.com
Yeah, I'm not planning on doing any of that. Text editing if there's
time, but I don't think so. I don't actually know how to do the rest
on a chumby board, but I'll mention how Unix does it if I can.

--Richard
--
--Richard Frankum

Taylan Ayken

unread,
Sep 21, 2012, 6:13:35 AM9/21/12
to tokyohac...@googlegroups.com
I have some experience with my Beaglebone and RPi on that matter. I'll have to check them out for chumby, then I can host a chumby class.



From: Richard Frankum <richard...@gmail.com>
To: tokyohac...@googlegroups.com
Sent: Friday, September 21, 2012 7:02 PM
Subject: Re: [THS:20314] Re: CLI class
--
You received this message because you are subscribed to the Google Groups "TokyoHackerSpace" group.
To post to this group, send email to tokyohac...@googlegroups.com.
To unsubscribe from this group, send email to tokyohackerspace+unsub...@googlegroups.com.

Taylan Ayken

unread,
Sep 21, 2012, 6:17:37 AM9/21/12
to tokyohac...@googlegroups.com
There is an OpenEmbedded (aka Angstrom) port for Chumby. There are some problems related to that (maintainers put the wrong MD5 hashes on a script after upgrading some packages) but there are solutions to that. I'll just backup my uSD card contents and use OpenEmbedded once I fully verify a solution.



From: MRE <epre...@gmail.com>
To: tokyohac...@googlegroups.com
Sent: Friday, September 21, 2012 6:38 PM
Subject: Re: [THS:20313] Re: CLI class
--
You received this message because you are subscribed to the Google Groups "TokyoHackerSpace" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tokyohackerspace/-/if7pOz_bma0J.

To post to this group, send email to tokyohac...@googlegroups.com.
To unsubscribe from this group, send email to tokyohackerspace+unsub...@googlegroups.com.

Torsten Wagner

unread,
Sep 21, 2012, 6:40:54 AM9/21/12
to tokyohac...@googlegroups.com
Hey MRE,

for serial, screen is your friend.

# screen /dev/ttyS<X> <speed>

should just jump-start you into the chumby board. In my opinion much
easier and much less hassle compared to all those other tools.

Screen or tmux is something people discover rather late but once you
get a idea of it, you want go without it.... its like having a window
manager under CLI....

Totti
> --
> You received this message because you are subscribed to the Google Groups "TokyoHackerSpace" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/tokyohackerspace/-/if7pOz_bma0J.

MRE

unread,
Sep 23, 2012, 2:06:38 AM9/23/12
to tokyohac...@googlegroups.com
Hmm.. perhaps we are thinking on the same lines, but different things...

On the chumby, the only way in (at least initially) is through the serial port.
It starts up. No SSH. No display.
Just hook up the usb - FTDI, open a terminal on the desktop, and tap return.

Instant CLI.

MRE

unread,
Sep 23, 2012, 2:07:35 AM9/23/12
to tokyohac...@googlegroups.com
Unless you were talking about moving data from the serial port to a file... ?

Torsten Wagner

unread,
Sep 23, 2012, 9:55:15 AM9/23/12
to tokyohac...@googlegroups.com
Hey MRE,

no thats what I meant to do...
"screen" can do fine with serial. Maybe it has a bit a misleading
name, the program called screen and has nothing to do with the
physical device

Check here:
screen - http://www.gnu.org/software/screen/
some more visual presentation -
http://www.youtube.com/watch?v=b2nZdChQvAs&feature=related
http://embeddedfreak.wordpress.com/2008/08/12/using-gnu-screen-to-debug-your-serial-port/


screen is also super nice to run on the embedded machine (or
display-less server) itself, since it allows you to keep whatever you
did running and get back to it anytime later. That is even if you
loose the connection your machine is still doing whatever you ask it
to do. Connect again, call screen and you are back on track.

Totti
> https://groups.google.com/d/msg/tokyohackerspace/-/6G96VaOgDSgJ.
Reply all
Reply to author
Forward
0 new messages