home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
terabyteunlimited.com
/
2014.06.terabyteunlimited.com.tar
/
terabyteunlimited.com
/
iflnet-unreg.zip
/
iflhelp.txt
< prev
next >
Wrap
Text File
|
2007-08-07
|
12KB
|
269 lines
Summary of Available Programs and Functionality:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A copy of this file can be viewed while running the IFL disk by typing
'iflhelp' at the command prompt. In addition to the topics covered below,
most Linux commands have syntax help available by typing the command without
any parameters, or by typing '<command> -h' or '<command> --help'.
Imageall:
~~~~~~~~~
This is a helper program for IFL that can backup and restore all partitions on
a hard drive. The imageall program, including the example scripts (backall and
restall), and a readme file are located in the /tbu directory. The imageall
program and the scripts should be run from that directory. See the readme.txt
file in /tbu for more information on imageall.
Using the nano text editor:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simple, easy to use text editor. At the bottom of the screen are 12 hot keys
that can be used to accomplish common tasks. For example <Ctrl+O> will save
the file, and <Ctrl+X> will exit nano. Additional help is available with
<Ctrl+G>.
Mounting NFS network shares (NFS = network file system):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assuming an NFS server is available on the network, and you have permissions
to access one or more shares, you can mount an NFS share as follows:
mount -t nfs -o intr 192.168.2.2:/testnfs /mnt
192.168.2.2 is the IP address of the NFS server, /testnfs is the NFS share,
and /mnt is the mount point. The -o intr is optional, but is generally
recommended. To unmount the share, use the standard umount command of
umount /mnt. For more information on NFS, the following web site is a
good resource: http://nfs.sourceforge.net/
Mounting Samba shares (or Windows shares):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Samba tools included on the disk can be used to mount Samba shares as
follows:
mount -t smbfs -o username=myuser,password=password //Debian/myuser /mnt
In this case, the standard mount command is used and -t smbfs is used to
specify that you are mounting a samba share. Debian is the server name,
myuser is the share name, and /mnt is the mount point. In the most common
case, you will usually need to supply a username and password to gain
access to the share, as shown above. The same command as above can be given
by using the smbmount program directly as follows:
smbmount //Debian/myuser /mnt -o username=myuser,password=password
In both cases above, you have the option of not giving the password on the
command line. If you do this, you will be prompted for the password after
executing the command. If you also need to specify the domain name (or
workgroup), that can done by using the workgroup option:
smbmount //Debian/myuser /mnt -o username=myuser,password=password,
workgroup=domain
To unmount the share, use the standard umount command of umount /mnt.
You can get a summary of usage and available mount options by typing
'smbmount' without parameters. Complete Samba documentation is available
at this web site: http://us2.samba.org/samba/
Mounting hard drive partitions:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hard drive partitions can be mounted as follows:
mount /dev/hda2 /mnt
Where /dev/hda2 is the partition to mount and /mnt is the mount point. While
not usually necessary, the filesystem type can also be specified:
mount -t ext2 /dev/hda2 /mnt (for an ext2 partition)
mount -t vfat /dev/hda2 /mnt (for a FAT or FAT32 partition)
mount -t reiserfs /dev/hda2 /mnt (for a ReiserFS partition)
ntfs-3g /dev/hda2 /mnt (for an NTFS partition)
To unmount, the standard umount command is used: umount /mnt
Mounting CD/DVD drives and floppy drives:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To mount a CD or DVD disc, the /cdrom directory is provided as an already
existing mount point. The mount command is as follows:
mount /dev/hdc /cdrom
Where /dev/hdc is the CD/DVD device, and /cdrom is the mount point. While
the kernel should automatically detect the iso file system, it is also
possible to specify that with this syntax:
mount -t iso9660 /dev/hdc /cdrom
To unmount, use umount /cdrom
To mount a floppy drive, the /floppy directory is provided as an already
existing mount point. The mount command would be:
mount /dev/fd0 /floppy
To unmount use umount /floppy
Using the ssh client to log into another computer:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ssh -l username 192.168.2.2
ssh username@192.178.2.2
The two commands above are the same. Username is the user you are logging in
as, and 192.168.2.2 is the IP address of the ssh server. Generally you will
need to specify the username unless you are logging in as root, which is
normally not allowed on most ssh servers. If a password is required to log
in, you will be prompted for it.
The first time each session that you connect to a given ssh server, you will be
prompted by ssh to confirm that you really want to do this. This will require
that you type 'yes' to confirm.
Once logged in, you will be at a command prompt. You can close the session by
typing 'exit' at the prompt.
Typing just 'ssh' will give a summary of the ssh command line options.
Logging into the IFL disk from another computer:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The IFL Network Disk (by default) has an ssh server running to allow ssh
logins. A user on a remote client can log in as root with either of the
following commands:
ssh -l root 192.168.2.2
ssh root@192.168.2.2
Where 192.168.2.2 is the IP address of the IFL disk. You will be prompted
for the root password, which by default is 'ifl'. To close the session,
type 'exit' at the prompt. When creating a custom disk, there is an option
in config.txt that can be set so that the ssh server is not started on boot,
and therefore remote logins are not possible.
Using the ncftp FTP client:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ncftp is actually a set of programs, but the most commonly used is the FTP
client, which is ncftp. You can connect to an FTP site with a command like
the following:
ncftp ftp.terabyteunlimited.com
Optionally, you can start ncftp without connecting to a server by just typing
'ncftp', and then using the 'open' command from the ncftp prompt to connect.
ncftp
open ftp.debian.org
If an FTP site does not allow anonymous logins, you will be prompted for a
username and password. Once connected, you can see all available commands by
typing '?'. The most commonly used commands will usually be some or all of
the following:
open <ftp-server> -> open connection to ftp-server
close -> close connection to server
ls (or ls -l) -> list files on server
cd directory -> change to directory on server
lcd directory -> change to directory on client
pwd -> print working directory on server
lpwd -> print working directory on client
get filename -> download filename from server
put filename -> upload filename to server
exit -> exit ncftp program
When you close a connection to a particular server for the first time, ncftp
will ask if you want to save a bookmark. If you choose to save it, you can
connect the next time by just typing 'open' from the ncftp prompt, and then
choosing the bookmark you saved. You can also do this by just typing
'ncftpbookmarks' from the Linux prompt.
There are several other programs included in the ncftp program set. You can
get the list of them, by typing 'ncftp' (without pressing Enter), and then
pressing <Tab> twice. The documentation for the entire set of programs can be
found at this web site: http://www.ncftp.com/ncftp
Check, format, and resize Linux filesystems (ext2/3 and reiserfs v3.xx):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The IFL disk contains the following programs to work with Linux filesystems:
mke2fs - format (or reformat) a partition with ext2 or ext3 filesystem
examples:
mke2fs -> display command line syntax and options
mke2fs /dev/hda2 -> format partition /dev/hda2 as ext2 (no journal)
mke2fs -j /dev/hda2 -> format partition /dev/hda2 as ext3 (with journal)
e2fsck - check/repair an ext2 or ext3 filesystem
examples:
e2fsck -> display command line syntax and options
e2fsck /dev/hda2 -> check filesystem on /dev/hda2 only if not cleanly unmounted
e2fsck -f /dev/hda2 -> force a check of /dev/hda2, regardless of clean status
resize2fs - resize an ext2 or ext3 filesystem
examples:
resize2fs -p /dev/hda2 -> resize filesystem to exact size of /dev/hda2
resize2fs -p /dev/hda2 750M -> resize filesystem to a size of 750 MB
resize2fs -p /dev/hda2 12G -> resize filesystem to a size of 12 GB
Important: Resize2fs ONLY resizes the filesystem, and NOT the partition itself.
If expanding a filesystem, the partition itself must be resized first in a
separate step. If shrinking a partition, the partition itself must be resized
after the filesystem. Changing the partition size must be done with a
partitioning program such as BootIt NG or Linux fdisk, which is included on
this disk. Resize2fs will never make the filesystem larger than the current
size of the underlying partition.
mkreiserfs - format (or reformat) a partition with the reiserfs filesystem
examples:
mkreiserfs -> display command line syntax and options
mkreiserfs /dev/hda2 -> format partition /dev/hda2 as reiserfs
reiserfsck - check/repair a reiserfs filesystem
examples:
reiserfsck -> display command line syntax and options
reiserfsck /dev/hda2 -> check filesystem on /dev/hda2
resize_reiserfs - resize a reiserfs filesystem
examples:
resize_resiserfs -> display command line syntax and options
resize_resiserfs /dev/hda2 -> resize filesystem to exact size of /dev/hda2
resize_resiserfs -s +1G /dev/hda2 -> increase filesystem size by 1 GB
resize_resiserfs -s -1G /dev/hda2 -> decrease filesystem size by 1 GB
resize_resiserfs -s +125M /dev/hda2 -> increase filesystem size by 125 MB
resize_resiserfs -s -125M /dev/hda2 -> decrease filesystem size by 125 MB
Important: Resize_reiserfs ONLY resizes the filesystem, and NOT the partition
itself. If expanding a filesystem, the partition itself must be resized first
in a separate step. If shrinking a partition, the partition itself must be
resized after the filesystem. Changing the partition size must be done with a
partitioning program such as BootIt NG or Linux fdisk, which is included on
this disk. Resize_reiserfs will never make the filesystem larger than the
current size of the underlying partition.
The fdisk and cfdisk partitioning programs:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These 2 programs are available to view or change the partitions on your hard
drives. Fdisk can be used interactively by typing 'fdisk /dev/hda' to work
with drive /dev/hda. Then, typing 'm' within fdisk will display the menu
options. You can also use fdisk from the command line to just view partitions
as follows:
fdisk -l -> list all partitions on all drives
fdisk -l /dev/hdb -> list all partitions on /dev/hdb
fdisk -l /dev/sda -> list all partitions on /dev/sda
Cfdisk is an interactive partitioning program that can be started with the
command 'cfdisk /dev/hda' to work with hard drive /dev/hda.
View or edit files or hard drive sectors in hex format using hexedit:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hexedit filename -> view/edit the filename in hex
hexedit -s /dev/hda -> view/edit hard drive /dev/hda sector by sector in hex