AMITIAE - Wednesday 19 September 2012


Command Line Work: New Users and Terminal (5) -- Internet Use


apple and chopsticks



advertisement


By Graham K. Rogers


Terminal


Ever since the first Macs appeared, they have been known for the graphical user interface (GUI): icons instead of command line work which before the mid-1980s was the norm. Paradoxically, the arrival of OS X brought with it easy access to the command line should users ever want this, although it is possible to use the computer without ever needing to work at the command line at all.


The history of Unix which was developed at Bell Labs is, in part, the story of modern computing. Without this, there would have been no internet in the form that we now know it, although the OS was not originally developed for this purpose. Its "unusual simplicity, power, and elegance" (About.com) intended for networking, was easy to scale up and fitted the bill perfectly.

As such there are many commands that we can use in Terminal that work directly with the Internet, although with the reduced number if installations of Unix- or Linux-based servers these days, some of the functions may not work as well as before. Microsoft Server may have certain functions (see below) but these are usually turned off by default and would need to be made active by the administrator.


Mail

A command that does not need any outside help, because it is baked into the Unix of OS X, is mail. Sending a message can be done directly from the command line, but there are limits to how the basic message can be handled. The manual (man mail) shows that there is a wide set of possibilities for using this command.

Nonetheless, a purpose of these articles is to introduce users to command line work in Terminal, so the basic command used is mail, followed by a space, then the email address of the recipient:

mail graham@myaccount.host.com

After the Enter key is pressed a line appears that allows the Subject to be typed in. When done, the Enter key is pressed again and the screen is available for the message to be written. I was able to use Copy & Paste to put those last two sentences into a message.

When done, the user presses the Control + D keys. The message is sent. The letters EOT appear on the screen and the user is returned to the command line.

In my case, when the mail arrives at its destination, the sender is shown as the user name on my computer: graham@Office-iMac.local which is not a proper address for a reply. In reality these days a mail program (such as Apple's Mail or Eudora or many other such clients) have a far more accessible set of options.


Telnet

Another of these commands is telnet which allows a user to connect with a remote host and use the command line on that host. This means I can be working on that other system using a direct link. We take this sort of thing for granted these days, but this was a rather valuable tool in the days before the world wide web and allowed users to check mail, for example, using software installed on the remote system.

To use the command, the name of the remote server must be used after a space, for example

telnet name.server.ac.th (depending on the name of the connection)

Alternatively, the IP number can be used (if it is available), for example,

telnet 203.113.122.130

[That is for Kasetsart University, Bangkok and that connection will be refused.]

Using the IP number has less chance of a successful connection than a name server it seems.

I was surprised to find that my own university that has moved to the Microsoft Server does still have the telnet feature available. Using this I am able to login remotely and work in my account using some of the older utilities and commands that were staples when the Internet first arrived here and long before the Graphical User Interface became the norm.


To be continued. . . .



See Also -

  • New Users and Terminal (1) -- A Quick Look Round
  • New Users and Terminal (2) -- Basic Navigation
  • New Users and Terminal (3) -- Shell Basics
  • New Users and Terminal (4) -- Lists and Manuals
  • New Users and Terminal (6) -- Questions of Identity
  • New Users and Terminal (7) -- A Little More Discovery
  • New Users and Terminal (8) -- File Commands and More
  • New Users and Terminal (9) -- Process Identification and Termination
  • New Users and Terminal (10) -- Browsing the Web using Unix
  • New Users and Terminal (11) -- Unix Tricks from OS X Daily
  • New Users and Terminal (12) -- Installed Text Editors - emacs, nano, pico, vi and vim
  • New Users and Terminal (13) -- Installing and Using the Utility, WGET
  • New Users and Terminal (14) -- Passwords, Purging and Closing Notes
  • New Users and Terminal (15) -- Permissions and chmod


    Graham K. Rogers teaches at the Faculty of Engineering, Mahidol University in Thailand. He wrote in the Bangkok Post, Database supplement on IT subjects. For the last seven years of Database he wrote a column on Apple and Macs.


  • advertisement



    Google


    Made on Mac

    For further information, e-mail to

    information Tag information Tag

    Back to eXtensions
    Back to Home Page