| Q: |
How
can I create a floppy
image from a
floppy disk? |
| A: |
cat
/dev/fd0 > /home/myhome/floppy.img
|
|
|
| Q: |
And
if I get permission
denied? How can I fix this? |
| A: |
su
password: <type the
root password>
chmod a+r /dev/fd0
exit |
|
|
| Q: |
How
can I test if the
sound card is working? |
| A: |
su
password: <type the
root password>
cat
/etc/inittab > /dev/dsp you
will hear noise.
exit |
|
|
| Q: |
How
can I see which user's
home exceeds 1 Gb of space? |
| A: |
du
-sh /home/* | grep G |
|
|
| Q: |
Is
my system aware of
Advanced Power Management? |
| A: |
lsmod
| grep apm for APM. ACPI needs another command.
|
|
|
| Q: |
What
other drivers do I
have? |
| A: |
They
are called "modules".
lsmod Look carefully.
|
|
|
| Q: |
Can
I unload a driver
...er... module and reload it? |
| A: |
su
password: <type the
root password>
rmmod
apm
modprobe apm or insmod apm
exit
|
|
|
| Q: |
What
pci cards do I have? |
| A: |
lspci
or lspci
-v | less or less /proc/pci
|
|
|
| Q: |
And
the irqs and other
resources? |
| A: |
lsdev
|
|
|
| Q: |
I
have 500 users and I
want to create a subdirectory "html" in each
one. |
| A: |
su
password: <type the root password>
for f in /home/* ;do mkdir
/home/$f/html;chown $f:users /home/$f/html;done
exit |
|
|
| Q: |
Oops!
I need 200Mb more
swap for 15 min. And do I have to reboot???? |
| A: |
su
password: <type the root
password>
cd /var
dd bs=1024 count=200 if=/dev/zero of=swap.swp
mkswap swap.swp
swapon swap.swp
exit No, you
don't have to reboot! |
|
|
| Q: |
Do
I always have to logout
and
login as root to halt my computer? |
| A: |
su -c 'halt'
|
|
|
| Q: |
A
friend came with an ISO
image. Can I see it without burning it to a cd?
|
| A: |
su (you
already know by now that you
will be asked the root password :))
mkdir /mnt/image
mount -t iso9660 -o loop myisoimage.iso /mnt/image
exit
cd /mnt/image ; ls
|
|
|
| Q: |
How
can I have a simple
script in my D: drive to automate the user
creation procedure everytime I use another distro? |
| A: |
For
this, please visit the ScriptMe page and
read the Panic 3
Paragraph! |
|
|
| Q: |
How
can I find which
configuration file calls another to better
understand configuration in general? |
| A: |
This
could be useful for
ConfigMe and SlackMe pages.
cd
/etc/rc.d or cd /etc/init.d or whatever
considering Distro.
grep
-l samba * We search which files assosiate with the SMB Services
and Daemons.
OR
grep
-l gpm * Who calls the gpm anyway? find it!
|
|
|
| Q: |
I
want to find the
"startx" script and then "type" it in one step. |
| A: |
cat
$(which startx) or less
$(which startx) |
|
|
| Q: |
I
want to see if my
network is up.
|
| A: |
ifconfig or /sbin/ifconfig if root paths are
not defined for users.
|
|
|
| Q: |
Am
I vulnerable?
|
| A: |
netstat -l
|
|
|
| Q: |
Am
I protected?
|
| A: |
su
-c 'iptables -L'
|
|
|
Q:
|
Am
I properly connected
(Gateway, DNS) to the internet?
|
A:
|
netstat -r ; echo '--' ; cat
/etc/resolv.conf
|
|
|
| Q: |
Which
daemons are
currently running?
|
| A: |
ps -ef | grep d$ , but not
entirely trustworthy.
|