[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
slackbook:basic_networking_utilities [2012/09/17 02:25 (UTC)] – [links] Added original text and formatting mfillpotslackbook:basic_networking_utilities [2012/09/17 02:47 (UTC)] – [lftp] Added original text and formatting mfillpot
Line 373: Line 373:
 ==== wget ==== ==== wget ====
  
-Unlike the other browsers we've looked at, wget(1) is non-interactive. Rather than display HTTP content, wget downloads it. This takes the "browsing" out of the web browser. Unlike the dump modes of other browsers, wget does not format its downloads; rather it copies the content in its exact form on the web server with all tags and binary data in place. It also supports several recursive options that can effectively mirror online content to your local computer. wget need not operate exclusively on HTTP content; it also supports FTP and several other protocols.+Unlike the other browsers we've looked at, 
 +**//wget//**(1) is non-interactive. Rather than display 
 +HTTP content, **//wget//** downloads it. This takes 
 +the //"browsing"// out of the web browser. Unlike the dump modes of other 
 +browsers, **//wget//** does not format its 
 +downloads; rather it copies the content in its exact form on the web 
 +server with all tags and binary data in place. It also supports several 
 +recursive options that can effectively mirror online content to your 
 +local computer.**//wget//** need not operate 
 +exclusively on HTTP content; it also supports FTP and several other 
 +protocols.
  
 <code> <code>
Line 393: Line 403:
 2010-05-01 13:51:22 (110 KB/s) - `ChangeLog.txt' saved [75306] 2010-05-01 13:51:22 (110 KB/s) - `ChangeLog.txt' saved [75306]
 </code> </code>
- 
 ===== Mail Clients ===== ===== Mail Clients =====
  
-Slackware also includes a variety of email clients. If you're using a graphical desktop, you'll find Thunderbird, Kmail, sylpheed and others. As with web browsers, there are also applications that function within the shell. Once you start using an email client in the console, you may find yourself not wanting to use anything else; the flexibility and configurability can be addicting. +Slackware also includes a variety of email clients. If you're using a 
 +graphical desktop, you'll find **//Thunderbird//**, 
 +**//Kmail//****//sylpheed//** 
 +and others. As with web browsers, there are also applications that 
 +function within the shell. Once you start using an email client in the 
 +console, you may find yourself not wanting to use anything else; the 
 +flexibility and configurability can be addicting.
 ==== pine ==== ==== pine ====
  
-pine is one of the oldest command-line interface mail clients still in existance and remains one of the most user-friendly. pine was created by the University of Washington and carries with it both a trademark and a copyright license that are difficult to work with. Thankfully back in 2005, the university saw fit to re-write it without the trademark and with a more open license, so alpine(1), the pine-clone distributed with Slackware, was born.+**//pine//** is one of the oldest command-line 
 +interface mail clients still in existance and remains one of the most 
 +user-friendly. **//pine//** was created by the 
 +University of Washington and carries with it both a trademark and a 
 +copyright license that are difficult to work with. Thankfully back in 
 +2005, the university saw fit to re-write it without the trademark and 
 +with a more open license, so **//alpine//**(1), the 
 +pine-clone distributed with Slackware, was born.
  
-To start using alpine, simply type pine at the command line. Using it is very simple due to its menu-driven system as well as the command reference neatly located at the bottom of the screen. See for yourself: 
  
-{{ :slackbook:sb_16-3_1_pine.jpg |}}+To start using **//alpine//**, 
 +simply type **//pine//** at the command line. 
 +Using it is very simple due to its menu-driven system as well as the 
 +command reference neatly located at the bottom of the screenSee for 
 +yourself:
  
-Before configuring any mail client, you should check the documentation of your mail server to gather all of the pertinent information about what protocols and security measures your mail service uses. This will help you configure pine correctlyBy default, pine will check for new e-mails delivered to a mail service running on your computer. Unless you're actually running such a mail service (many people do) this probably isn't what you want. Fortunately configuring pine is a straight forward process. Simply enter the [S]etup menu and chose the [C]onfig option. You'll be given an option to enter you name, mail path, SMTP server, and many other options.+{{ :slackbook:pine.png?550 |pine}}
  
 +Before configuring any mail client, you should check the
 +documentation of your mail server to gather all of the pertinent
 +information about what protocols and security measures your mail
 +service uses. This will help you configure
 +**//pine//** correctly. By default,
 +**//pine//** will check for new e-mails delivered
 +to a mail service running on your computer. Unless you're actually
 +running such a mail service (many people do) this probably isn't
 +what you want. Fortunately configuring
 +**//pine//** is a straight forward process.
 +Simply enter the [S]etup menu and chose the [C]onfig option. You'll
 +be given an option to enter you name, mail path, SMTP server, and
 +many other options.
 ==== mutt ==== ==== mutt ====
  
-Some people don't like pine. Some people want more control. Some people want a fully-configurable mail client with plugin support and a no-nonsense attitude. Those people use mutt(1). mutt isn't as user friendly as pine, but makes up for it with power. You won't find the user-friendly command reference at the bottom of the screen, mutt uses every last inch of real-estate for mail processing duty. It's feature support is extensive - threaded displays are no problem for the mighty mixed-breed! You can configure mutt with a .muttrc file in your home directory. With all the many different possible configuration options, there's even a man page for that, muttrc(5). You might want to read up on it.+Some people don't like **//pine//**. Some people 
 +want more control. Some people want a fully-configurable mail client 
 +with plugin support and a no-nonsense attitude. Those people use 
 +**//mutt//**(1). **//mutt//** 
 +isn't as user friendly as **//pine//**, but makes up 
 +for it with power. You won't find the user-friendly command reference 
 +at the bottom of the screen, **//mutt//** uses every 
 +last inch of real-estate for mail processing duty. It's feature support 
 +is extensive - threaded displays are no problem for the mighty 
 +mixed-breed! You can configure **//mutt//** with a 
 +''.muttrc'' file in your home directory. With all the 
 +many different possible configuration options, there's even a man page 
 +for that, muttrc(5). You might want to read up on it.
  
-{{ :slackbook:sb_16-3_2_mutt.jpg |}}+{{ :slackbook:sb_16-3_2_mutt.jpg?550 |mutt}}
  
-Using mutt is unique because it is by nature a Mail User Agent (MUA), meaning its true purpose is to read and sort email. This was its only job originally, although some additional features such as retrieving mail via POP3 and even very basic transfering messages via SMTP have snuck into the application.+Using **//mutt//** is unique because it is by 
 +nature a Mail User Agent (MUA), meaning its true purpose is to read 
 +and sort email. This was its only job originally, although some 
 +additional features such as retrieving mail via POP3 and even very 
 +basic transfering messages via SMTP have snuck into the application.
  
-As is so often the case with robust console-based applications, the configuration options are myriad, and there is no "right" or "wrong" way of using mutt as long as it does what you want it to do. One thing to keep in mind if you are considering using mutt for mail handling is that its mail sending and receiving abilities are very limited. mutt focuses solely on sorting, reading, and composing mail messages in addition to other traditional Mail User Agent duties. This is keeping in focus with the UNIX philosophy of small tools that do one thing very well and which can be combined (or "chained") with other tools to complete whatever tasks are required. With this in mind, you'll likely need to setup some external tool to receiving mail at a minimum. 
  
-The commands used to navigate around in mutt are highly customizable but the defaults can be listed by typing **?**.+As is so often the case with robust console-based applications, the 
 +configuration options are myriad, and there is no //"right"// or 
 +//"wrong"// way of using **//mutt//** as long 
 +as it does what you want it to do. One thing to keep in mind if you 
 +are considering using **//mutt//** for mail 
 +handling is that its mail sending and receiving abilities are very 
 +limited. **//mutt//** focuses solely on sorting, 
 +reading, and composing mail messages in addition to other traditional 
 +Mail User Agent duties. This is keeping in focus with the UNIX 
 +philosophy of small tools that do one thing very well and which can 
 +be combined (or //"chained"//) with other tools to complete whatever 
 +tasks are required. With this in mind, you'll likely need to setup 
 +some external tool to receiving mail at a minimum.
  
 +
 +The commands used to navigate around in **//mutt//** are highly
 +customizable but the defaults can be listed by typing
 +<key>'?'</key>.
 ==== mailx ==== ==== mailx ====
  
-So those are great and everything, but what if you just want a mail client that isn't menu-driven? Thankfully mailx is here to save you.+So those are great and everything, but what if you just want a mail 
 +client that isn't menu-driven? Thankfully 
 +**//mailx//** is here to save you. 
  
-mailx is based on the Berkeley Mail application, with a mail command appearing as early as Version 1 of AT&T's UNIX. It can be used either interactively or non-interactively. 
  
-mailx reads mail from your computer's mail spool and displays the usual combination of sender, subject, status, and size in a list, leaving the user at an interactive prompt. In fact, it might look familiar to you if you bothered checking your mail immediately after installing Slackware and read Pat Volkerding's greeting.+**//mailx//** is based on the Berkeley Mail 
 +application, with a **//mail//** command 
 +appearing as early as Version 1 of AT&T's UNIX. It can be 
 +used either interactively or non-interactively. 
 + 
 + 
 +**//mailx//** reads mail from your computer's 
 +mail spool and displays the usual combination of sender, subject, 
 +status, and size in a list, leaving the user at an interactive 
 +prompt. In fact, it might look familiar to you if you bothered 
 +checking your mail immediately after installing Slackware and read 
 +Pat Volkerding's greeting. 
  
 <code> <code>
 +
 darkstar:~# mailx darkstar:~# mailx
-Heirloom mailx version 12.4 7/29/08.  Type ? for help.+Heirloom mailx version 12.4 7/29/08.Type ? for help.
 "/var/spool/mail/root": 2 messages 2 new "/var/spool/mail/root": 2 messages 2 new
->N  1 To root            Thu Mar 10 23:33   52/1902  Register with the Linux counter project +>N1 To rootThu Mar 10 23:33 52/1902Register with the Linux counter project 
- N  2 To root            Thu Mar 10 23:35  321/15417 Welcome to Linux (Slackware 14.0)!+ N2 To rootThu Mar 10 23:35321/15417 Welcome to Linux (Slackware 14.0)!
 ?; ?;
 </code> </code>
  
-To read a message, enter the number of the message at the prompt. This displays the message using more, so use the **RETURN** key to view the next page. Once the end of the message has been reached, press **q** to return to the list view, or **RETURN** to continue to the next message. 
  
-To see a list of available commands, enter **?** at the mail prompt; using the commands provided, you can view the headers of mail in the spool, reply, delete, save, and many other common email tasks.+To read a message, enter the number of the message at the 
 +prompt. This displays the message using 
 +**//more//**, so use the <key>'RETURN'</key> 
 +key to view the next page. Once the end of the message has been 
 +reached, press <key>'q'</key> to return to the list view, or 
 +<key>'RETURN'</key> to continue to the next message. 
 + 
 + 
 +To see a list of available commands, enter <key>'?'</key> at the 
 +**//mail//** prompt; using the commands provided, 
 +you can view the headers of mail in the spool, reply, delete, save, 
 +and many other common email tasks
 + 
 + 
 +**//mailx//** is most powerful when used in 
 +scripting. For all of the options available for 
 +**//mailx//**, view its man page. A simple way to 
 +send an email to someone requires only the command itself and the 
 +destination address.
  
-mailx is most powerful when used in scripting. For all of the options available for mailx, view its man page. A simple way to send an email to someone requires only the command itself and the destination address. 
  
 <code> <code>
-  darkstar:~$  mailx bob@example.com+ 
 +darkstar:~$mailx bob@example.com
 </code> </code>
  
-After the command has been issued, an interactive prompt appears for a subject line, the message body, and the end character (a single period on an otherwise empty line). 
  
-mailx can be used entirely without human intervention, however. Generally, it's safe to assume that any attribute you can define in the interactive shell for mailx can also be defined while scripting it or using it as one non-interactive command.+After the command has been issued, an interactive prompt appears for 
 +a subject line, the message body, and the end character (a single 
 +period on an otherwise empty line). 
 + 
 + 
 +**//mailx//** can be used entirely without human 
 +intervention, however. Generally, it's safe to assume that any 
 +attribute you can define in the interactive shell for 
 +**//mailx//** can also be defined while scripting 
 +it or using it as one non-interactive command. 
  
 <code> <code>
-  darkstar:~$ mailx -n -s "Test message" bob@example.com < ~/message.txt+ 
 +darkstar:~$ mailx -n -s "Test message" bob@example.com < ~/message.txt
 </code> </code>
  
-In this example, the contents of the file message.txt would be sent as the message body to the specified recipient. No interaction from the user is required. 
  
-Within one's own computer (localhost) or one's own network, sending email in this manner is entirely possible. But over the internet a few more steps are usually required along the way. Of course, most notably there is usually an smtp server handling the delivery of your email. This, too, can be specified as part of your mail command:+In this example, the contents of the file 
 +''message.txt'' would be sent as the message body 
 +to the specified recipient. No interaction from the user is required. 
 + 
 + 
 +Within one's own computer (localhost) or one's own network, sending 
 +email in this manner is entirely possible. But over the internet a 
 +few more steps are usually required along the way. Of course, most 
 +notably there is usually an smtp server handling the delivery of your 
 +email. This, too, can be specified as part of your 
 +**//mail//** command: 
  
 <code> <code>
-  darkstar:~$  env MAILRC=/dev/null + 
-  from="bob@example.com (Bob Dobbs)" +darkstar:~$env MAILRC=/dev/null 
-  smtp=relay.example.com mail -n -s "Test message" connie@example.com < ~/message.txt+from="bob@example.com (Bob Dobbs)" 
 +smtp=relay.example.com mail -n -s "Test message" connie@example.com < ~/message.txt
 </code> </code>
  
-In this case, the MAILRC variable is set to /dev/null in order to override any system defaults, and the smtp server as well as the //FROM:// line are defined. The rest of the command is the same as using mailx internally within one's own computer or network. 
  
-Over allmailx is usually viewed as a mail client with the bare-minimum features; this is largely true, but when you need to be able to script sending notification emails or important update messagesit quickly becomes a lot more valuable than a fully interactive application like pine or mutt.+In this case, the //MAILRC// variable is set to 
 +/dev/null in order to override any system defaultsand the 
 +smtp server as well as the //FROM:// line are 
 +defined. The rest of the command is the same as using 
 +**//mailx//** internally within one's own 
 +computer or network.
  
-===== FTP Clients ===== 
  
-Lots of data is stored on FTP servers the world over. In factSlackware Linux was first publically offered via FTP and continues to be distributed in this fashion today. Most open source software can be downloaded in source code or binary form via FTPso knowing how to retrieve this information is handy skill.+Over all, **//mailx//** is usually viewed as a 
 +mail client with the bare-minimum features; this is largely true, 
 +but when you need to be able to script sending notification emails 
 +or important update messagesit quickly becomes lot more valuable 
 +than a fully interactive application like 
 +**//pine//** or **//mutt//**. 
 +===== FTP Clients =====
  
 +Lots of data is stored on FTP servers the world over. In fact,
 +Slackware Linux was first publically offered via FTP and continues to
 +be distributed in this fashion today. Most open source software can be
 +downloaded in source code or binary form via FTP, so knowing how to
 +retrieve this information is a handy skill.
 ==== ftp ==== ==== ftp ====
  
-The simplest FTP client included with Slackware is named simply, ftp(1) and is a reliable if somewhat simple means of sending and retrieving data. ftp connects to an FTP server, asks for your username and password, and then allows you to put or get data to and from that server. ftp has fallen out of favor with more experienced users do to a lack of features, but remains a handy tool, and much of the documentation you see online will refer you to it.+The simplest FTP client included with Slackware is named simply, 
 +**//ftp//**(1) and is a reliable if somewhat simple 
 +means of sending and retrieving data. **//ftp//** 
 +connects to an FTP server, asks for your username and password, and 
 +then allows you to put or get data to and from that server. 
 +**//ftp//** has fallen out of favor with more 
 +experienced users do to a lack of features, but remains a handy tool, 
 +and much of the documentation you see online will refer you to it
 + 
 + 
 +Once an FTP session has been initialized, you'll be placed at a prompt 
 +somewhat like a shell.From here you can change and list directories 
 +using the //"cd"// and //"ls"// commands, just like a shell.Additionally, you 
 +may issue the //"put"// command to send a file to the server, or a //"get"// 
 +command to retrieve data from the server. If you're connecting to a 
 +public FTP server, you'll want to use the //"anonymous"// username and 
 +simply enter your e-mail address (or a fake one) for the password.
  
-Once an FTP session has been initialized, you'll be placed at a prompt somewhat like a shell. From here you can change and list directories using the "cd" and "ls" commands, just like a shell. Additionally, you may issue the "put" command to send a file to the server, or a "get" command to retrieve data from the server. If you're connecting to a public FTP server, you'll want to use the "anonymous" username and simply enter your e-mail address (or a fake one) for the password. 
  
 <code> <code>
Line 502: Line 651:
 ==== ncftp ==== ==== ncftp ====
  
-ncftp(1) (pronounced nick-f-t-p), is a more feature rich successor to ftp, supporting tab completion and recursive retrieval. It automatically connects to a server as the anonymous user, unless you specify a different username on the commandline with the [-uargument. The primary advantage over ftp is the ability to send and retrieve multiple files at once with the "mput" and "mget" commands. If you pass the [-Rargument to either of them, they will recursively put or get data from directories.+**//ncftp//**(1) (pronounced nick-f-t-p), is a more 
 +feature rich successor to **//ftp//**, supporting 
 +tab completion and recursive retrieval. It automatically connects to a 
 +server as the anonymous user, unless you specify a different username 
 +on the commandline with the //-u// argument. The primary 
 +advantage over **//ftp//** is the ability to send 
 +and retrieve multiple files at once with the //"mput"// and //"mget"// 
 +commands. If you pass the //-R// argument to either of them, 
 +they will recursively put or get data from directories. 
  
 <code> <code>
 darkstar:~# ncftp ftp.osuosl.org darkstar:~# ncftp ftp.osuosl.org
-Logging in...                                                                   +Logging in... 
 Login successful. Login successful.
-Logged in to ftp.osuosl.org.                                                    +Logged in to ftp.osuosl.org.
 ncftp / > cd pub/slackware/slackware-current ncftp / > cd pub/slackware/slackware-current
 Directory successfully changed. Directory successfully changed.
 ncftp ...ware/slackware-current > mget -R isolinux ncftp ...ware/slackware-current > mget -R isolinux
-isolinux/README.TXT:                                     4.63 kB 16.77 kB/s   +isolinux/README.TXT: 4.63 kB 16.77 kB/s 
-isolinux/README_SPLIT.TXT:                             788.00 B    5.43 kB/s   +isolinux/README_SPLIT.TXT: 788.00 B5.43 kB/s 
-isolinux/f2.txt:                                       793.00 B    5.68 kB/s   +isolinux/f2.txt: 793.00 B5.68 kB/s 
-isolinux/initrd.img:                                    13.75 MB 837.91 kB/s   +isolinux/initrd.img:13.75 MB 837.91 kB/s 
-isolinux/iso.sort:                                      50.00 B  354.50 B/s    +isolinux/iso.sort:50.00 B354.50 B/s  
-isolinux/isolinux.bin:                                  14.00 kB 33.99 kB/s   +isolinux/isolinux.bin:14.00 kB 33.99 kB/s 
-isolinux/isolinux.cfg:                                 487.00 B    3.30 kB/s   +isolinux/isolinux.cfg: 487.00 B3.30 kB/s 
-isolinux/message.txt:                                  760.00 B    5.32 kB/s   +isolinux/message.txt:760.00 B5.32 kB/s 
-isolinux/setpkg:                                         2.76 kB 19.11 kB/s  +isolinux/setpkg: 2.76 kB 19.11 kB/s
 ncftp ...ware/slackware-current > bye ncftp ...ware/slackware-current > bye
 </code> </code>
- 
 ==== lftp ==== ==== lftp ====
  
-The last client we're going to look at is lftp(1). Like ncftp, it supports tab completion and recursive activity, but has a more friendly license. Rather than user "mget" and "mput", all recursive operations are handled with the "mirror" command. "mirror" has many different options available, so I'll have to refer you to the man page and the built-in "help" command for complete details.+The last client we're going to look at is 
 +**//lftp//**(1).Like 
 +**//ncftp//**, it supports tab completion and 
 +recursive activity, but has a more friendly license.Rather than user 
 +//"mget"// and //"mput"//, all recursive operations are handled with the 
 +//"mirror"// command.//"mirror"// has many different options available, so 
 +I'll have to refer you to the man page and the built-in //"help"// command 
 +for complete details. 
  
 <code> <code>
 darkstar:~# lftp ftp.osuosl.org darkstar:~# lftp ftp.osuosl.org
 lftp ftp.osuosl.org:~> cd /pub/slackware/slackware-current lftp ftp.osuosl.org:~> cd /pub/slackware/slackware-current
-cd ok, cwd=/pub/slackware/slackware-current            +cd ok, cwd=/pub/slackware/slackware-current
 lftp ftp.osuosl.org:/pub/slackware/slackware-current> mirror isolinux lftp ftp.osuosl.org:/pub/slackware/slackware-current> mirror isolinux
-Total: 2 directories, 16 files, 1 symlink                                      +Total: 2 directories, 16 files, 1 symlink
 New: 16 files, 1 symlink New: 16 files, 1 symlink
 14636789 bytes transferred in 20 seconds (703.7K/s) 14636789 bytes transferred in 20 seconds (703.7K/s)
 lftp ftp.osuosl.org:/pub/slackware/slackware-current> bye lftp ftp.osuosl.org:/pub/slackware/slackware-current> bye
 </code> </code>
- 
 ===== rsync ===== ===== rsync =====
  
 slackbook:basic_networking_utilities ()