RPM's
A lot of new users like these types of files because they are probably
the easiest to use. They are installers and often you can install
them by right-clicking on the file and then selecting "Install"
From there you just wait till it's done. If you want to use the
terminal then it is best to use konqueror file browser (not web
browser) to go to the directory where the file is and then select
(at the top menu) Tools-Open Terminal and then enter your rpm command
from there. Don't forget that you can use tab key to autocomplete
the names of the files that you are installing so you don't have
to type the whole thing out. Here are some commands that are associated
with Rpm files:
rpm -ivh [filename] (installs a
package)
rpm -?vh [filename]--test (tests
a package but doesn't install it)
rpm -Uvh [filename] (upgrades a
package to a newer version)
Tricks I have learned:
To install a series of rpms all in one directory
with no other files in it:
rpm -ivh *
To install a series of rpms all in one directory
with other file types in it:
rpm -ivh *.rpm
rpm -e [filename] (uninstalls package
- use with caution)
rpm --help (self explanatory...
hopefully)
RPM.BIN a few lines needed for these, do all of the following
in the terminal...
chmod a+x [filename]
./[filename] (in the directory
where the file is located)
.BIN
./[filename] (in the directory
where the file is located)
.run
sh [filename]
Other Commands you can Enter in the Terminal:
/sbin/lsmod
(lists all the devices attached and recognized by linux)
/sbin/ifconfig (lists your internet
information - should have two sections: eth0 and lo for high speed
for example)
top (lists processes)
/sbin/lspci (lists all pci devices
connected and recognized)
cdrecord -scanbus (lists cd rom devices that have scsi enabled -
your cd burner should be here if you have one)
rpm -qa|grep
[filename] - (where as the "|" is the "\" key shifted)
to find out what packages and versions are installed associated
with a certain program. Command used in rpm based distros only.
ps
-e - lists the processes
that are running currently on your system
free
- shows the amount of system memory used by your system, swap
and cached.
/sbin/ifconfig
- shows properties of your network
/sbin/ip
addr - displays your internet
address
/sbin/ip
for more options
mkdir
- makes a directory (ie- mkdir ctmlinux)
rmdir -
removes a directory, but only if it's empty (ie - rmdir ctmlinux)
rm -r -
removes a directory even if files are within (ie - rm -r ctmlinux)
rm -rf -
same as above but the 'f' will force it if it isn't working for
some reason.
rm -ir
- removes a directory but prompts you to ok the deletion of each
individual file within (ie - rm -ir ctmlinux)
aumix -I
- as long as aumix is installed, you can use that command in your
terminal to get an interactive display of your volume levels that
allows you to adjust it. This is handy if you don't have kde or
gnome or don't use a window manager and only use text mode. For
more info, you can see the aumix man page (leaves a lot to be
desired imho though).
-v - displays the output in the terminal.
This is helping for cdburning (cdrecord -v...), copying and moving
files (cp -v or mv -v respectively)
mkisofs -J -r -o
[filename].iso /mnt/cd -
Makes an iso of whatever information it sees mounted in the cdrom
drive (your mountpoint may be different than /mnt/cd)
useradd -m -s /bin/bash
[username] - Adds a user
to your box and copies a skeleton directory, creating a /home
for that user.
groupadd [groupname]
- adds a group of whatever you select - check your /etc/group
file to make sure your user is able to use that group
userdel -r [username]
- Deletes the selected user.
tar -czvf [filename].tar.gz [directoryname]
- Creates a tar.gz file from the specified directory.
tar -czvf [filename].tar.gz
[filename1] [filename2] [filename3]
(and so on) - Creates a tar.gz file from the specified files.
To View the files and filesize or files on one's
computer:
du -h [directory or file]
so for root:
du -h /
to slow it down so you can scroll thru it:
du -h / |less
To list directories by filesize:
du /* -s -h
(for root)
Creating an alias
Basically it means
to create short forms for some of the commands you use in the terminal
or you can change what things are called to make more sense if you
like. Here are a couple of examples:
For cdburning: blanking a disc: alias blankcd="cdrecord
-v speed=12 dev=0,0,0 -eject blank=fast"
(this means you only need to type in "blankcd" (no quotes)
in order to erase a disc.
For seeing what is in a directory: alias dir="ls
-a"
(if dir makes more sense to you than ls -a, then you can use that
to view the contents of a directory.
*note - you only need to use the quotes when there are spaces in
the command for which you are creating the alias, so if you only
wanted to use "ls" in the second example instead of "ls -a" you
could do this: alias dir=ls and that would work as well.
|