Subj : I got telnet working To : Spaceman Spiff From : Angus Mcleod Date : Mon Jan 10 2005 08:50 am Re: I got telnet working By: Spaceman Spiff to All on Sun Jan 09 2005 21:21:00 > I am using Telnet from a command prompt/ Is there any better telnet programs > for Linux. That's what I use. I don't know of any other.... > I tried downloading one, seems all I got was source code. I loaded the > development software onto this system, trying to find the compiler > c++ ...no luck yet :) The C/C++ compiler is (probably) called 'gcc' (GNU C compiler). I say 'probably' because I don't know for sure what dev. software you loaded, but 'gcc' is the one I'd expect. To compile, you probably want to unpack the source into a sub-directory and then run 'make' anyway. Installing from source is usually a three-step procedure under Linux. After you unpack the tarball and switch to the directory: ./configure make make install There is usually a README or INSTALL file in the directory giving details. > Anyway, I am in here with the Telnet software that came with mandrake. This > Telnet> prompt is taking back. Flash back from my first UNIX shell with my o > IDT SHell Internet account in the early 90's. You shouldn't see the telnet> prompt unless you run telnet with no arguments, or somehow press Ctrl-] in mid-use. Just do telnet some.bbs.com 2323 The port number is optional if it's the standard 23. You can telnet to a mailserver on port 25 and talk directly to it, if you like... :-) > I tried this command Angus: > [mark@localhost mark]$ sfdisk -1 /dev/hda > bash: sfdisk: command not found Probably for the best. :-) It was a lower-case 'Ell', not a 'One'. Anyway, 'sfdisk' is usually a root-only program so try [mark@localhost mark]$ su Password: [root@localhost root]# sfdisk -l /dev/hda and see if you get anything. "Ell", not "One". If no luck with 'sfdisk' then you can use 'cfdisk' or 'fdisk' but these are interactive. cfdisk /dev/hda will give you a list of all partitions on /dev/hda. Unless you want to mess with them, 'q' for 'quit' is the way outta there. fdisk /dev/hda requires the 'p' command at the prompt to 'print' a list of partitions. Again, 'q' to 'quit'. > Ok I am a newbie, do I need to be in the dev/hda directory for this to > work? No. /dev/hda is not a directory, it is a device (as is most of the stuff in the /dev directory). /dev/hda is your first hard drive (primary master). /dev/hdb is the primary slave (second HD? CD-ROM?) and so forth. UNIX uses a scheme where devices and files present themselves in the same way to the application. > I am tryino figure out my navigation on the drive, I can see HOME, but no CC > drive. Is home the drive, or like My Computer would be in WIndows...except > see no drive with Mandrake. Do you mean the C:\ drive? Linux (UNIX) uses a single, unified directory tree structure. All drives (partitions) are 'mounted' as a part of a tree that is 'rooted' in the root directory called '/'. Any partition on any device can be attached to any EMPTY directory on the already-existing directory tree. The system starts at bootup with one empty directory (root, "/") and all filesystems are then mounted from there by the startup scripts. Let me use my system as an example. Here are the partitions on my hard drive: root@triphod:/home/amcleod# sfdisk -l /dev/hda Disk /dev/hda: 4982 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 0+ 15 16- 128488+ 82 Linux swap /dev/hda2 16 31 16 128520 82 Linux swap /dev/hda3 32 529 498 4000185 83 Linux /dev/hda4 530 4981 4452 35760690 5 Extended /dev/hda5 530+ 1027 498- 4000153+ 83 Linux /dev/hda6 1028+ 3019 1992- 16000708+ 83 Linux /dev/hda7 3020+ 3023 4- 32098+ 83 Linux /dev/hda8 3024+ 4981 1958- 15727603+ 83 Linux (Never mind the Swap and Extended partitions right now.) Now I boot with LILO and /etc/lilo.conf says (in part) boot = /dev/hda root = /dev/hda3 Since I ran LILO on this config file BEFORE booting, LILO knows this withOUT first having to boot to read /etc/lilo.conf. So lilo boots off /dev/hda (primary master) and 'mounts' the fifth partition (/dev/hda5) into the root ("/") directory. All the files and sub-directories on /dev/hda5 are now immediately found in and under "/". Therefore, you could think of "/" as your C:\ drive! But we're not done yet! Now that root is mounted, we can start running the startup scripts on it, and the bootup process continues. The file /etc/fstab says (in part): /dev/hda5 / ext2 defaults 1 1 /dev/hda3 /usr ext2 defaults 1 2 /dev/hda6 /music reiserfs defaults 1 2 /dev/hda8 /home reiserfs defaults 1 2 # /dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 /dev/sda1 /camera vfat user,noauto 0 0 Well, we already have /def/hda5 mounted on / or we wouldn't be accessing this file as yet! So now we can go and mount /dev/hda3 in the empty sub- directory /usr, /dev/hda6 on the empty sub-directory /music and /dev/hda8 on the empty sub-directory /home. Those three empty directories exist on the root directory / which is /dev/hda5 which we were thinking of as C:\, so we now mount partitions D:\, E:\ and F:\ on TOP of C:\. All this done automatically at boot-up thanks to the boot scripts and /etc/fstab. The extra lines in /etc/fstab would mount my CD-ROM, floppy and Olympus USB Camera on the named sub-directories, but because they are 'noauto' it isn't done at boot-up. So now we can run the 'Disk Free' program 9called 'df', of course): amcleod@triphod:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda5 3874724 2039740 1634980 56% / /dev/hda6 16000212 15577104 423108 98% /music /dev/hda8 15727116 13108824 2618292 84% /home /dev/hda3 3874756 2104836 1569912 58% /usr Darn! /music is looking a little full! I'll have to install another HD as the secondary slave, partition it as /dev/hdd1, mount it to /temp, copy /music to it, unmount /dev/hda6 from /music, unmount /dev/hdb1 from /temp, RE-mount /dev/hdb1 back on /music and change /etc/fstab to make the change happen automatically on next bootup! :-) Notice that inside /home are the user $HOME directories. Each user has his own space. I suppose /home/amcleod would be the Linux equivilent to Win2K's C:\Documents and Settings\Angus McLeod directory. That's just a few things you wish you didn't have to know about Linux filesystems. Actually, you don't have to know this to be getting on. Just imagine that ALL drives are run together into a SINGLE directory tree starting at / with no C: drive specifier necessary because in fact > I was playing with Knoppix on another computer and with that I can see both > ROM and drives, but then I am booting from CD and working out of RAM > DRIVE...which I don't think I saw. Don't know Knoppix, but try 'df' and you should see exactly how your filesystem tree is made up. Disk partitions, CR-ROM drives, USB drives, RAM drives, network shares, loopback partitions, and everything. > Maybe just a map would cool, or a WIndows/DOS to LINUX translation manual, :-) remember two important commands: 'apropos' and 'man'. if you want to know what the system can do about playing MP3 files, try amcleod@triphod:~$ apropos MP3 mpg321 (1) - Free clone of mpg123, a command-line mp3 player normalize-mp3 (1) - adjust levels of mp3 or ogg files by running normalize(1), then re-encoding Hmm! 'mpg321' might work. What does the manual for that about say? amcleod@triphod:~$ man mpg321 MPG321(1) MPG321(1) NAME mpg321 -- Free clone of mpg123, a command-line mp3 player SYNOPSIS mpg321 [options] file(s) | URL(s) | - DESCRIPTION mpg321 is a free command-line mp3 player, which uses the mad audio decoding library...... And of course, DOVE-Net is a valuable resource too..... > Wish I could find the compiler, haha...OK I am lost but this fun anyway. ] Try 'gcc' but look for a README or INSTALL file that tells you what to do. it's more common to run 'make' than to run the compiler directly. > Please excuse my ramblings, it is late and I entered the LINUX ZONE.... > twilight zone music is playing in the back ground...I think I hear Rod > Sterling's voice.... Just wait until you start hearing that background music from 'Jaws' instead! :-) --- þ Synchronet þ Linus is a regular at The ANJO BBS. No, Linus Brathwaite! .