home *** CD-ROM | disk | FTP | other *** search
/ terabyteunlimited.com / 2014.06.terabyteunlimited.com.tar / terabyteunlimited.com / iflnet-unreg.zip / iflhelp.txt < prev    next >
Text File  |  2007-08-07  |  12KB  |  269 lines

  1. Summary of Available Programs and Functionality: 
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. A copy of this file can be viewed while running the IFL disk by typing
  5. 'iflhelp' at the command prompt. In addition to the topics covered below,
  6. most Linux commands have syntax help available by typing the command without
  7. any parameters, or by typing '<command> -h' or '<command> --help'.
  8.  
  9. Imageall: 
  10. ~~~~~~~~~
  11. This is a helper program for IFL that can backup and restore all partitions on
  12. a hard drive. The imageall program, including the example scripts (backall and
  13. restall), and a readme file are located in the /tbu directory. The imageall
  14. program and the scripts should be run from that directory. See the readme.txt
  15. file in /tbu for more information on imageall.
  16.  
  17.  
  18. Using the nano text editor:
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. Simple, easy to use text editor. At the bottom of the screen are 12 hot keys 
  21. that can be used to accomplish common tasks. For example <Ctrl+O> will save 
  22. the file, and <Ctrl+X> will exit nano. Additional help is available with
  23. <Ctrl+G>.
  24.  
  25.  
  26. Mounting NFS network shares (NFS = network file system):  
  27. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28. Assuming an NFS server is available on the network, and you have permissions
  29. to access one or more shares, you can mount an NFS share as follows:
  30.  
  31. mount -t nfs -o intr 192.168.2.2:/testnfs /mnt
  32.  
  33. 192.168.2.2 is the IP address of the NFS server, /testnfs is the NFS share,
  34. and /mnt is the mount point. The -o intr is optional, but is generally 
  35. recommended. To unmount the share, use the standard umount command of
  36. umount /mnt. For more information on NFS, the following web site is a
  37. good resource: http://nfs.sourceforge.net/
  38.  
  39.  
  40. Mounting Samba shares (or Windows shares): 
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. The Samba tools included on the disk can be used to mount Samba shares as 
  43. follows:
  44.  
  45. mount -t smbfs -o username=myuser,password=password //Debian/myuser /mnt
  46.  
  47. In this case, the standard mount command is used and -t smbfs is used to
  48. specify that you are mounting a samba share. Debian is the server name, 
  49. myuser is the share name, and /mnt is the mount point. In the most common 
  50. case, you will usually need to supply a username and password to gain 
  51. access to the share, as shown above. The same command as above can be given
  52. by using the smbmount program directly as follows:
  53.   
  54. smbmount //Debian/myuser /mnt -o username=myuser,password=password
  55.  
  56. In both cases above, you have the option of not giving the password on the
  57. command line. If you do this, you will be prompted for the password after
  58. executing the command. If you also need to specify the domain name (or
  59. workgroup), that can done by using the workgroup option:
  60.  
  61. smbmount //Debian/myuser /mnt -o username=myuser,password=password,
  62. workgroup=domain
  63.  
  64. To unmount the share, use the standard umount command of umount /mnt. 
  65. You can get a summary of usage and available mount options by typing
  66. 'smbmount' without parameters. Complete Samba documentation is available
  67. at this web site: http://us2.samba.org/samba/
  68.    
  69.  
  70. Mounting hard drive partitions:
  71. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72. Hard drive partitions can be mounted as follows:
  73.  
  74. mount /dev/hda2 /mnt
  75.  
  76. Where /dev/hda2 is the partition to mount and /mnt is the mount point. While
  77. not usually necessary, the filesystem type can also be specified:
  78.  
  79. mount -t ext2 /dev/hda2 /mnt  (for an ext2 partition)
  80. mount -t vfat /dev/hda2 /mnt  (for a FAT or FAT32 partition)
  81. mount -t reiserfs /dev/hda2 /mnt (for a ReiserFS partition)
  82. ntfs-3g /dev/hda2 /mnt  (for an NTFS partition)
  83.     
  84. To unmount, the standard umount command is used: umount /mnt
  85.  
  86.  
  87. Mounting CD/DVD drives and floppy drives:
  88. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89.  
  90. To mount a CD or DVD disc, the /cdrom directory is provided as an already
  91. existing mount point. The mount command is as follows:
  92.  
  93. mount /dev/hdc /cdrom
  94.  
  95. Where /dev/hdc is the CD/DVD device, and /cdrom is the mount point. While
  96. the kernel should automatically detect the iso file system, it is also
  97. possible to specify that with this syntax:
  98.  
  99. mount -t iso9660 /dev/hdc /cdrom
  100.  
  101. To unmount, use umount /cdrom
  102.  
  103. To mount a floppy drive, the /floppy directory is provided as an already
  104. existing mount point. The mount command would be:
  105.  
  106. mount /dev/fd0 /floppy
  107.  
  108. To unmount use umount /floppy
  109.  
  110.  
  111. Using the ssh client to log into another computer:
  112. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  113.  
  114. ssh -l username 192.168.2.2
  115. ssh username@192.178.2.2
  116.  
  117. The two commands above are the same. Username is the user you are logging in 
  118. as, and 192.168.2.2 is the IP address of the ssh server. Generally you will 
  119. need to specify the username unless you are logging in as root, which is 
  120. normally not allowed on most ssh servers. If a password is required to log
  121. in, you will be prompted for it.
  122.  
  123. The first time each session that you connect to a given ssh server, you will be
  124. prompted by ssh to confirm that you really want to do this. This will require
  125. that you type 'yes' to confirm.
  126.  
  127. Once logged in, you will be at a command prompt. You can close the session by
  128. typing 'exit' at the prompt. 
  129.  
  130. Typing just 'ssh' will give a summary of the ssh command line options. 
  131.  
  132.  
  133. Logging into the IFL disk from another computer:
  134. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135. The IFL Network Disk (by default) has an ssh server running to allow ssh 
  136. logins. A user on a remote client can log in as root with either of the 
  137. following commands:
  138.  
  139. ssh -l root 192.168.2.2
  140. ssh root@192.168.2.2
  141.  
  142. Where 192.168.2.2 is the IP address of the IFL disk. You will be prompted 
  143. for the root password, which by default is 'ifl'. To close the session, 
  144. type 'exit' at the prompt. When creating a custom disk, there is an option
  145. in config.txt that can be set so that the ssh server is not started on boot,
  146. and therefore remote logins are not possible.
  147.  
  148.  
  149. Using the ncftp FTP client:
  150. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  151. Ncftp is actually a set of programs, but the most commonly used is the FTP
  152. client, which is ncftp. You can connect to an FTP site with a command like
  153. the following:
  154.    
  155. ncftp ftp.terabyteunlimited.com
  156.  
  157. Optionally, you can start ncftp without connecting to a server by just typing
  158. 'ncftp', and then using the 'open' command from the ncftp prompt to connect. 
  159.  
  160. ncftp
  161. open ftp.debian.org
  162.  
  163. If an FTP site does not allow anonymous logins, you will be prompted for a 
  164. username and password. Once connected, you can see all available commands by
  165. typing '?'. The most commonly used commands will usually be some or all of 
  166. the following:
  167.  
  168.    open <ftp-server>    -> open connection to ftp-server
  169.    close                -> close connection to server
  170.    ls (or ls -l)        -> list files on server
  171.    cd directory         -> change to directory on server
  172.    lcd directory        -> change to directory on client
  173.    pwd                  -> print working directory on server
  174.    lpwd                 -> print working directory on client
  175.    get filename         -> download filename from server
  176.    put filename         -> upload filename to server
  177.    exit                 -> exit ncftp program
  178.  
  179. When you close a connection to a particular server for the first time, ncftp
  180. will ask if you want to save a bookmark. If you choose to save it, you can
  181. connect the next time by just typing 'open' from the ncftp prompt, and then
  182. choosing the bookmark you saved. You can also do this by just typing
  183. 'ncftpbookmarks' from the Linux prompt.
  184.  
  185. There are several other programs included in the ncftp program set. You can 
  186. get the list of them, by typing 'ncftp' (without pressing Enter), and then 
  187. pressing <Tab> twice. The documentation for the entire set of programs can be
  188. found at this web site: http://www.ncftp.com/ncftp
  189.  
  190.  
  191. Check, format, and resize Linux filesystems (ext2/3 and reiserfs v3.xx):
  192. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. The IFL disk contains the following programs to work with Linux filesystems:
  194.  
  195. mke2fs - format (or reformat) a partition with ext2 or ext3 filesystem
  196. examples:
  197. mke2fs -> display command line syntax and options
  198. mke2fs /dev/hda2  -> format partition /dev/hda2 as ext2 (no journal)
  199. mke2fs -j /dev/hda2 -> format partition /dev/hda2 as ext3 (with journal)
  200.  
  201. e2fsck - check/repair an ext2 or ext3 filesystem
  202. examples:
  203. e2fsck -> display command line syntax and options
  204. e2fsck /dev/hda2 -> check filesystem on /dev/hda2 only if not cleanly unmounted
  205. e2fsck -f /dev/hda2 -> force a check of /dev/hda2, regardless of clean status
  206.  
  207. resize2fs - resize an ext2 or ext3 filesystem
  208. examples:
  209. resize2fs -p /dev/hda2 -> resize filesystem to exact size of /dev/hda2
  210. resize2fs -p /dev/hda2 750M -> resize filesystem to a size of 750 MB
  211. resize2fs -p /dev/hda2 12G -> resize filesystem to a size of 12 GB
  212.  
  213. Important: Resize2fs ONLY resizes the filesystem, and NOT the partition itself.
  214. If expanding a filesystem, the partition itself must be resized first in a 
  215. separate step. If shrinking a partition, the partition itself must be resized
  216. after the filesystem. Changing the partition size must be done with a 
  217. partitioning program such as BootIt NG or Linux fdisk, which is included on 
  218. this disk. Resize2fs will never make the filesystem larger than the current 
  219. size of the underlying partition.
  220.  
  221. mkreiserfs - format (or reformat) a partition with the reiserfs filesystem
  222. examples:
  223. mkreiserfs -> display command line syntax and options
  224. mkreiserfs /dev/hda2 -> format partition /dev/hda2 as reiserfs
  225.  
  226. reiserfsck - check/repair a reiserfs filesystem
  227. examples:
  228. reiserfsck -> display command line syntax and options
  229. reiserfsck /dev/hda2 -> check filesystem on /dev/hda2
  230.  
  231. resize_reiserfs - resize a reiserfs filesystem
  232. examples:
  233. resize_resiserfs -> display command line syntax and options
  234. resize_resiserfs /dev/hda2 -> resize filesystem to exact size of /dev/hda2
  235. resize_resiserfs -s +1G /dev/hda2 -> increase filesystem size by 1 GB
  236. resize_resiserfs -s -1G /dev/hda2 -> decrease filesystem size by 1 GB
  237. resize_resiserfs -s +125M /dev/hda2 -> increase filesystem size by 125 MB
  238. resize_resiserfs -s -125M /dev/hda2 -> decrease filesystem size by 125 MB
  239.  
  240. Important: Resize_reiserfs ONLY resizes the filesystem, and NOT the partition 
  241. itself. If expanding a filesystem, the partition itself must be resized first 
  242. in a separate step. If shrinking a partition, the partition itself must be 
  243. resized after the filesystem. Changing the partition size must be done with a 
  244. partitioning program such as BootIt NG or Linux fdisk, which is included on 
  245. this disk. Resize_reiserfs will never make the filesystem larger than the 
  246. current size of the underlying partition.
  247.  
  248.  
  249. The fdisk and cfdisk partitioning programs:
  250. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251. These 2 programs are available to view or change the partitions on your hard
  252. drives. Fdisk can be used interactively by typing 'fdisk /dev/hda' to work 
  253. with drive /dev/hda. Then, typing 'm' within fdisk will display the menu 
  254. options. You can also use fdisk from the command line to just view partitions
  255. as follows:
  256.  
  257. fdisk -l -> list all partitions on all drives
  258. fdisk -l /dev/hdb -> list all partitions on /dev/hdb
  259. fdisk -l /dev/sda -> list all partitions on /dev/sda
  260.  
  261. Cfdisk is an interactive partitioning program that can be started with the
  262. command 'cfdisk /dev/hda' to work with hard drive /dev/hda. 
  263.  
  264.  
  265. View or edit files or hard drive sectors in hex format using hexedit:
  266. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  267. hexedit filename -> view/edit the filename in hex
  268. hexedit -s /dev/hda -> view/edit hard drive /dev/hda sector by sector in hex
  269.