Blood in the water: trying to use Cygwin, what Linux to use

Page 1 of 2 [ 17 posts ]  Go to page 1, 2  Next

pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

02 May 2009, 9:04 pm

you guys have given me some hints, but I may have a potential job. Problem is, it's all 'command line linux'. I've been pointed to something called cygwin (which, as you probably all know), is allegedly for porting programs into or out of Linux (or maybe not...;)

I've had one actual Linux course 5 years ago (Red Hat 8), and some 'courses' on vary narrow ranges of Linux functions (such exciting fare as 'package installation and documentation in Debian and Red Hat Linux, printing in Linux, etc)

I've downloaded Ubunto 9.04 (because you guys say good things about it). I know if I get Red Hat, there's zip for support because they want money (and I have none...;)

Is there an easy way to learn command-line linux? any thoughts on tutorials, support sites, etc?

I'm downloading the larger package of cygwin, all the GUIs, libraries etc. When I finished, commands like 'ls' and 'cat' didn't work. Even I know that's not right...;)

Lead me, guide me...;)



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 36
Gender: Male
Posts: 12,518
Location: Room 101

02 May 2009, 9:14 pm

Disclaimer: I've never used Cygwin.

If it's all command-line, it doesn't matter what distro you choose since Bash is Bash. If ls and cat aren't working, then you'll need to find a functioning Linux command line before worrying about the nuances of how to use all its features.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

02 May 2009, 11:49 pm

well, that's true...;) Actually, what I've learned tonight is not to install everything...;;)

the basic install is about 60-70% of the 300 or so commands I've found for Linux. I think I'll add new stuff (vi isn't included, for example) very sparingly. Probably how they do it in the real world.

The remote devices they use are so small, that they don't have room for a GUI. I'll do a little more selective Googling, and see what I can come up with

Was just checking to see if there are any sites I can go to about learning Linux (for real...;)

thanks for the reply.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

03 May 2009, 5:54 am

pakled wrote:
well, that's true...;) Actually, what I've learned tonight is not to install everything...;;)

the basic install is about 60-70% of the 300 or so commands I've found for Linux. I think I'll add new stuff (vi isn't included, for example) very sparingly. Probably how they do it in the real world.

The remote devices they use are so small, that they don't have room for a GUI. I'll do a little more selective Googling, and see what I can come up with

Was just checking to see if there are any sites I can go to about learning Linux (for real...;)

thanks for the reply.

This may be what you are after:
The Linux Documentation Project.

It's rather a long while since I used Cygwin. I'd ignore the GUI stuff it comes with, as you will find it much easier to run a full Linux system as a virtual machine.

Using Cygwin just for the command shell will give your Windows system a huge boost. For things totally beyond Windows' capabilities, commands that I found invaluable are such as: grep, find, sed, vim, tar, and even bash itself (which is a programming language in its own right).

Then you will also want gcc, for a full C programming environment.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

03 May 2009, 9:34 am

ok, worked a bit more on it. sed, I got, vim I think I loaded (went back for a 2nd install, cherry-picking things like (the mighty command) ping, etc. grep and find are there, bash doesn't give me a 'not found' message, so maybe that's there.

I took C about 20 years ago, but the possible job is mainly reaching out to telecomm equipment and 'dope-slapping' it back into commission...;) Maybe another time; C has morphed into 'doubleplus good', sharp, flat, and semiquaver...;)

Thanks for the site. looks like it will be of some use.



GustavHolst
Blue Jay
Blue Jay

User avatar

Joined: 8 Apr 2009
Age: 47
Gender: Male
Posts: 95

04 May 2009, 3:09 pm

pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

04 May 2009, 3:51 pm

thanks. I've downloaded some tutorials (beginning shell scripts - 127 pages...yeesh...;)

I've managed so far to
open vi (not too hard)
create a simple script (uname, cat, and ls)
save the thing (much harder)
run it in cygwin

So far, so good. I've taken my first step into a smaller world...;)

-btw, does vi stand for 'vile interface?'...;)



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

05 May 2009, 4:57 am

pakled wrote:
thanks. I've downloaded some tutorials (beginning shell scripts - 127 pages...yeesh...;)

Well... bash is versatile. Most people will never use more that a fraction of its capabilities. When I really need something like its in-line ability to remap filename extensions, I delve into "man bash" or "info bash" to figure out the syntax. ${PARAMETER/PATTERN/STRING}

pakled wrote:
I've managed so far to
open vi (not too hard)
create a simple script (uname, cat, and ls)
save the thing (much harder)
run it in cygwin


Your problem with "save the thing" may be because you haven't found ZZ yet. That's just hitting two capital Zs in the "visual" mode.

pakled wrote:
So far, so good. I've taken my first step into a smaller world...;)

-btw, does vi stand for 'vile interface?'...;)

Well... "visual", but that, when the terminal concerned is one of the utterly simple "text only" displays - and monochrome, even.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


peterd
Veteran
Veteran

User avatar

Joined: 25 Dec 2006
Age: 73
Gender: Male
Posts: 1,375

05 May 2009, 7:54 am

Once you've got Ubuntu installed, and a sun-java6 installed over the top of it, and a jEdit to take care of seeing text files, there's nowhere much to go but into the thickets of the command line.

If you're really keen on C code, then an Eclipse will help. Past that, I dunno. It's all mysterious to me.



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 36
Gender: Male
Posts: 12,518
Location: Room 101

05 May 2009, 9:24 am

pakled wrote:
-btw, does vi stand for 'vile interface?'...;)

According to Saint IGNUcius, vi (which bears a curious resemblance to the Roman letter six) is indeed a veiled reference to the number 666. "Vi vi vi is the text editor of the beast."


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


kalantir
Veteran
Veteran

User avatar

Joined: 25 Dec 2008
Gender: Male
Posts: 712
Location: Redmond, WA USA

05 May 2009, 2:52 pm

pakled wrote:
Is there an easy way to learn command-line linux? any thoughts on tutorials, support sites, etc?

There probably is but i don't know of any off the top of my head. But I can give you the same info I started with back in the day. These are the commands my stepdad told me and I kinda figured the rest out myself.

ls - List the contents of the current directory.
cd - Change directories.
apropos - usefull for finding man pages and such. (apropos <topic> brings up a list of topics by name of the man page with a very brief description of what it is)
man - help/tutorial files for most linux commands
info - Similar to man(sometimes even gives you the same page) but usually tells you how to use the program in question.
| - pipe output from one program to another. (ex. "telnet shattered.org 23 | tee LogFile" the first command is telnet. the arguments are shattered.org and 23... the address and port number. Thats simply how I connect to my favorite mud. the | pipes the output which is simple text... to the program to the right. tee logs output into a file. LogFile is the name of the file for tee to write to. So if you typed that into the command line, it would connect you to a mud and start logging it to LogFile.)
If none of this is new to you, I'm sure you'll be fine. If it is, I hope it's helpful.

lau wrote:
Your problem with "save the thing" may be because you haven't found ZZ yet. That's just hitting two capital Zs in the "visual" mode

Indeed. So pakled, if you havent figured it out yet, its i or <insert> to enter insert mode, and <esc> to go back to command mode. ZZ is for save and quit. If you wish to save without quitting you can hit :w instead. If it complains about it being write only just add a ! so it'd be :w!

As cool as cygwin is... has anyone here ever messed with CoLinux? I tried it once and found it to be more enjoyable to use then cygwin, although I guess it isn't entirely comparable since they are really 2 different things.


_________________
2101729 Kalantir-Bar-Orc-Mal-Cha escaped the dungeon


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

05 May 2009, 9:53 pm

thanks all. Progress is proceeding apace.

I wound up with vim (but not vigor...;), can get in and out (I wind up wither using wq to save and exit, or q!...strangely enough, ZZ doesn't get me anything but some old blues rockers...;)

Sat down this weekend with the web, found 2 100+ page tutorials. have a few commands worked out, barely started on shell scripts (one generates html templates...verrry simple ones)

it's slow slogging, but I'm a lot farther on how linux works. I'd give a lot if they just had a 'clear' command, though, but i may make a script to sub in for that...;)

Appreciate all the help guys. Was expecting a big fight over the 'right' linux and 'right' editor (didn't hear a word about emacs...;), but who says we can't be civil?...;)



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

06 May 2009, 5:07 am

pakled wrote:
...

I wound up with vim (but not vigor...;), can get in and out (I wind up wither using wq to save and exit, or q!...strangely enough, ZZ doesn't get me anything but some old blues rockers...;) ...

It may be just a joke, but it's the way you write it? :)

I.e., for me, wq moves forward a word and then starts to enter recording mode, while q! just beeps at me (because ! is not a valid register to record in).

Most of us vi users spend all our time in insert/normal modes. I erroneously referred to this as "visual" mode, earlier, but "visual" is a new (sic) set of three extra modes in "vim", as opposed to "vi".

Anyway, when I said to use ZZ, I meant that you should use it direct from "normal" mode. It isn't a "command" mode thing, which I would have quoted as ":ZZ". I could also have suggested a gratuitous ESC or two, just before it, in case you happen to be in any other mode.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


GustavHolst
Blue Jay
Blue Jay

User avatar

Joined: 8 Apr 2009
Age: 47
Gender: Male
Posts: 95

06 May 2009, 2:47 pm

There's Cream that apparently makes Vi[m] easier to use. If you're having problems with Vi, you could try it out. Dunno if that's of any use to you or not

http://cream.sourceforge.net/index.html



0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 44
Gender: Male
Posts: 11,038
Location: London

06 May 2009, 3:54 pm

peterd wrote:
Once you've got Ubuntu installed, and a sun-java6 installed over the top of it, and a jEdit to take care of seeing text files, there's nowhere much to go but into the thickets of the command line.

If you're really keen on C code, then an Eclipse will help. Past that, I dunno. It's all mysterious to me.

Eek I am not really fond of using Java interfaces for things like this, just an editor. It is slow. There are plenty of good editors out there.



pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 68
Gender: Male
Posts: 7,015

06 May 2009, 4:28 pm

it's a thought, but here's how it goes.

the potential job does command-line diagnostics and control to manage telecomm switches and routers. Each unit has only 64 meg of storage, so no GUIs. They use vi, ftp, telnet, and linux scripts to manage all that. Unfortunately, we have to deal with the situation as it is, otherwise I'd be KDE'ing and GNOMEing my way around.

In all the decades I've been doing computers, this would be my 12th OS...;)

yeah, the vim thing's a bad pun...but that comes naturally to computer types...;)

I'll fiddle and see if I can get ZZ to work...