Home and Index

Self-Help Links

Linux Links

Outside Computer Links

 
Linux Tidbits


Main Directories, files of linux machine


/ root of drive
/bin all executable apps
/boot kernal, boot
/dev -possible devices
/etc
/root root The Unix superuser account (with user name "root" and user ID 0) that overrides file permissions
/sbin system commands secondary applications and system binaries -not used by user
/home home directories
/lib library files. Compiler
source data >compiler> makes file execuatable
compiler uses libraries ex: available codes for routine functions
this is like .dll file in Windows
/lost & found -stores lost file handles
/mnt .mount directory takes devices in /dev to mount at particular directory 
/proc running processes are stored if needed
/export

TCP/IP ports
80 web
110 pop
 28 stmp
 21 ftp
 23 telnet
mpre /etc/services command to see services

 The "document root directory" for Apache web server in Linux. The directory is /var/www/html

Inittab /etc/inittab is a very critical file, and it is 'dangerous' to edit it unless you know  what exactly you are doing.
 
 During the installation of Linux, towards the end, you are asked "Do you want to create a boot disk?" You MUST select "Yes", and create a boot floppy. 

IF you have the boot floppy, you can easily revert to the saved inittab file.  

 You will NEVER be prompted for a password.

After you create a user, you have to type: passwd <username>

Killing a process example-sendmail

You first do ps aux | grep sendmail

Then you note down the PID number, which is in the first column

Then you do kill PID#

You can change the shell.

Try Ctrl-F1, F2, F3, etc

You should be able to switch shells.

Following are the steps to create a "Boot-Install" floppy for Linux.

1. Place the CD in the drive of a Windows machine
2. Place a new, formatted floppy disk in the drive
3. Open up the "Command Prompt" or "DOS Shell"
4. Change directory (cd) to x:\dosutils where 'x' is the drive letter
of the CD ROM drive
5. Execute the program RAWRITE.EXE
6. You will be asked the drive letter of your floppy drive
7. You will be asked for the name of the 'Image file'. For this, you
enter:
\images\boot.img (Don't forget the first back slash)
8. The floppy disk will be created.

ssh -l ckoh IP This command to use ssh includes username-then you just type password
Control-D -to logout to another user

Samba 
To start Samba 
Cd /etc/init.d
Cmb start
Go to /etc/rc.d 
Ln -s /etc/initd.mb 535 samba -to create Samba file in /etc/rc.d file to load Samba at startup.
./Ssamba stop

To see other machines, you need to modify /etc/hosts file
192.168.1.50 cklinux.cybermind.com
Modify /etc/sysconfig/network 
Domainname=cybermind.com

Printing in linux
Run printtool to add printers
Printer takes data and converts it to a file printer can understand before printing. 
For Linux to Windows: test.txt > smb > prints file
In linux, the printer definition file is like a driver in Windows. 


hda hda1 hda2 hda3 C: drive
hdb d: drive
hdc, hdc1, hdc2 linux drive, 3rd drive

/mnt/d hdb1
mount W95 drive mount -l vfat /d

mount -type to see all devices currently mounted
mount <device> <mount point-usually a directory>
mount -t then what file system you want to mount default is linux

Do NOT test connectivity using Ping. Just start up the browser in Linux, and you should be able to surf the web.

Boot diagnosis:
If you want to do some diagnosis, type-in dmesg | more
and carefully read all the lines, you might see the specific error.
You can also see exactly what happened during boot up by the following:-

cat /var/log/messages | more
Networking: hostname:
Simply type hostname and press Return
It should display the host name.
If you want to change it, typ; hostname newname <Enter>
This will change the host name.

First of all, /etc/inittab is a very critical file, and it is 'dangerous' to edit it unless you know what exactly you are doing.

Secondly, during the installation of Linux, towards the end, you are asked "Do you want to create a boot disk?" You MUST select "Yes", and create a boot floppy. I don't know you did this (may be, click, click, click?)

Whenever you get stuck in Xwindows, and the desktop does not come up because of video setting, all 
you have to do is, press Ctrl - Alt - BackSpace
This will get you out of Xwindows and take you back to the shell prompt in Linux.

The only reason why your Linux desktop is not coming up correctly, is the change of Monitor.
There is a very simple way to resolve this.
After you logon as root, you have to run a program called 'xf86config'. When it runs, you will be 
asked a series of questions, all of which you have to answer. That's all.
Since you have never done this before, just call me tonight. I'll step you through the process.

The simplest way to find the directory is:

ps -ef | grep http

You should be able to see the path "IF" your web server is up and running.

If not, install the Apache RPM which is already there.

1. Type-in the command: adduser nick <press enter>
2. Type-in: passwd nick (typed in password) <press enter>
3. When you are prompted, type-in the password of your choice <press enter>
4. You will be asked enter the password again - do so and <press enter>
That's it.

add user <username> creates user
passwd <username>

Don't use mail command-this communicates directly with mail daemon 
mail -checks mail mail <email address> send mail
-v (verbose) to see what's here
Can use pico for mail body
daemon is continuously running program.
cntrl -l check mail with Pine mail program

> is directing command

TAB Use tab key to complete command
Use arrow keys:
^ Use up arrow to bring up previous command 
v Use down arrow to go down in history of commands
history to see history of commands-you can scroll through with up and down arrows