Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem ram recovery router safe mode screen slow sound spyware trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
<-----------ur Contribution....tips Reserviour

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:30 AM #1
<-----------ur Contribution....tips Reserviour
Share ur linux tips to simplify....
One thing I like to do is paste this into my /etc/profile file:

DEFAULT="\[\033[0;0m\]"

BLACK="\[\033[0;30m\]"
BLUE="\[\033[0;34m\]"
GREEN="\[\033[0;32m\]"
CYAN="\[\033[0;36m\]"
RED="\[\033[0;31m\]"
PURPLE="\[\033[0;35m\]"
BROWN="\[\033[0;33m\]"
LGRAY="\[\033[0;37m\]"

DGRAY="\[\033[1;30m\]"
LBLUE="\[\033[1;34m\]"
LGREEN="\[\033[1;32m\]"
LCYAN="\[\033[1;36m\]"
LRED="\[\033[1;31m\]"
LPURPLE="\[\033[1;35m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[1;37m\]"


then I can set up my PS1's using $WHITE or what ever color I want through out my Command prompt and just add $DEFAULT at the end so the text you type isnt colored


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~``
find this usefull for manually running my backup scripts.

To run a command line program in background:

Follow your command with an &

$./mycommand &
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:31 AM #2
CD burning tips
Some CD burning tips:
# Burn an ISO to disk
cdrecord -v speed=5 dev=0,0,0 -data /path/to/foo.iso
# Burn from disk to disk
cdrecord -v dev=0,0,0 speed=5 -isosize /dev/cdrom
# Generate an ISO from a directory.
mkisofs -J -r -o foo.iso /path/to/directory
mkisofs -v -r -T -J -U -V "Label" -o foo.iso /path/to/directory
# Generate an ISO from a CD
dd if=/dev/cdrom of=foo.iso
Linux MP3 CD Burning mini-HOWTO
# Convert mp3 to wav
for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done
# Convert mp3 to wav with lame
for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done
# Burn a CD from wav files
cdrecord -v -audio -pad speed=5 dev=0,0,0 /path/to/*.wav
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:33 AM #3
DOES LINUX SUPPORT NTFS?????

All modern Linux kernels (all 2.4.x and many 2.2.x) DO support NTFS in read-only mode.

Long Answer:
Although you can read NTFS partitions created with any version of Windows NT, you can not WRITE to an NTFS partition created with Windows 2000, XP, or anything yet to come. NTFS partitions created with Windows NT 4.0 and earlier CAN be written to, but this tends to make a mess of the filesystem, so make sure to do a chkdsk when you boot into NT after writing from Linux.

Below are in-depth instructions on how to gain access to your NTFS partition form Linux.

To access your NTFS partition:
1. Open a shell if you haven't already.
2. Become root. Do this by running su and entering your root password when prompted.
3. Create a mount point for the NTFS partition. mkdir /mnt/ntfs
4. Mount your NTFS partition. mount -t ntfs -o umask=000 /dev/device /mnt/ntfs
Replace device with the name of your NTFS partition. See below for advice on how to find this if you don't know.
5. The contents of the NTFS partition is now part of your tree. When you want to access a file on it, just think of /mnt/ntfs as C:\ and you're all set.
6. When you are done, repeat steps 1 and 2 (if you exited the shell) and run umount /mnt/ntfs

If you want all that to be done automatically when you boot Linux (doesn't take effect until you reboot of course):

1. Open a shell and become root as described before.
2. Open your fstab file. kedit /etc/fstab
Note that this assumes you have KEdit (part of the kdeapps package) installed. If you don't, replace kedit with vim, xemacs, gnotepad, or whatever text editor you like.
3. Add this line somewhere in the file:
/dev/device /mnt/ntfs ntfs umask=000 0 0
4. Save and exit.
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:33 AM #4
CONFIGURE TV OUT(NVIDIA)
*****************
1. Hook your TV up to your card somehow. I do it by attaching the SVideo-to-RCA adapter to the card, and putting an RCA cable between the adapter and my VCR.
2. Open up your /etc/X11/XF86Config file in whatever text editor you like. You will need root priviledges to save the file, so make sure you launch the editor from a root shell, or use some other method to suid root the editor.
3. Add this entry below your monitor section in the file:

--------------------------------------------------------------------------------
Section "Monitor"
Identifier "TV1"
HorizSync 30-50
VertRefresh 60
Option "TVStandard" "tv type"
Option "TVOutFormat" "COMPOSITE"
EndSection
--------------------------------------------------------------------------------

Replace tv type with the type of TV you're hooking it up to. If it's a TV from North America (US and Canada) you'd put NTSC-M here. I think TV's from most European countries are PAL-I. There's a big list of countries and their TV standards in the readme file. This can be found at /usr/share/doc/NVIDIA_GLX-1.0/README

4. Add this line at the end of your Device section.
Option "ConnectedMonitor" "TV"

5. Save the file.
6. Restart X, and the display will come up on your TV instead of your monitor.
7. Watch some DivX movies, or fire up a console emulator, or do any number of things that you'd rather do with a TV than with a monitor.
8. When you are ready to go back to your monitor, open up the /etc/X11/XF86Config file
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:34 AM #5
USING LINUX AS A ROUTER (WITHOUT DEDICATED FIREWALLS)
******************************************
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Then just set up your other systems just like you would if you were using ICS on a windows box
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:34 AM #6
ONE COOL TIP THAT I HAVE FOUND
***************************


Here's a trick (needs broadband)

1. First, ensure you have xmms installed with the mpeg layer 1,2,3 plugin.

2. Go to www.shoutcast.com (or any other streaming audio site) and get some streaming audio going (just click "tune in" and then open with xmms)

3. In XMMS: options - preferences - audio I/O - mpeg layer 1,2,3 player - configure - streaming

4. Enable "save stream to disk" and pick the path of a nice fat directory to save to MP3 stream to.

5. Now, press play again on xmms and it will start recording the stream.

6. The fun part... at the CLI, type the following:

at now + 500 minutes

and press enter. You should get another "command prompt" for at, and type:

killall -9 xmms

and press enter. Now do a

ctrl-d

To tell "at" that you are finished.

Then go to sleep. When you wake up, you will have a 500 minute MP3 that you can burn to a CD.

I also used the "at" command, left a blank CD-R in the drive, and had the disk burned for when I woke up!
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:36 AM #7
How to find out things in Linux with bash commands
Don't forget that re-direction and piping add to the power in bash, so some of these tips use them.

# Basic piping
some_command | another_command
See Linux and the tools philosophy
# Basic re-direction:
command > textfile_name
See this Text Manipulation Article
# Basic concantenation:
If you don't want to overwrite a file but add to the bottom of an existing file, concantenate it:
command >> exisiting_text_file

The bash commands:
# Find CPU specifications
cat /proc/cpuinfo

# What pci cards are installed and what irq/port is used
cat /proc/pci

# Memory information
free

# How is the hard drive partitioned
fdisk /dev/hdXX -l

# How much free drive space
df -h

# Show disk usage by current directory and all subdirectories
du | less

# Find running kernel version
uname -r

# Find X server version
X -showconfig

# What is the distribution
cat /etc/.product
cat /etc/.issue
cat /etc/issue
cat /etc/issue.net
sysinfo

# For finding or locating files
find
locate
which
whereis

# Use dmesg to view the kernel ring buffer (error messages)
dmesg | less

# Watch error messages as they happen (sysklog needed)
as root, tail -f /var/log/messages (shows last 10 lines, use a number in front of f for more lines)

# What processes are running
ps -A

# Find a process by name
ps -ef | grep -i
For example, XCDroast
ps -ef | grep -i xcdroast /* Case Insensitive */

# See current environment list, or pipe to file
env | more
env > environmentvariablelist.txt

# Show current userid and assigned groups
id

# See all command aliases for the current user
alias

# See rpms installed on current system
rpmquery --all | more
rpmquery --all > .txt
rpmquery --all | grep -i
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:39 AM #8
COMBINING LINX AND WINDOWS
**********************

To access shared folders in Linux:
1. Open a shell.
2. Become root. su and enter your root password when asked for it.
3. Create a mount point for the shared folder. mkdir /mnt/share
4. Mount the shared folder. mount -t smbfs -o username=username,password=password //compname/sharename /mnt/share

Replace username with your username on the other box and password with the associated password. Replace compname with the name of the computer, and sharename with the name of the share.
If you didn't get any errors, you're all set. The folder is "mapped" to /mnt/share.

If you DID get an error, this part might help:

If the error said "can't open /etc/smb.conf: no such file" or something like that, ignore it. You don't need a config file just to mount shares.

If the error said "wrong fs type or bad superblock on //compname/sharename", it means samba isn't installed. Install it and try again.

If it said "unknown filesystem smbfs" or "kernel doesn't support smbfs" or something like that, it means you don't have smbfs support in your kernel. Run modprobe smbfs and try again. If it still doesn't work, you will have to build a new kernel with SMB support enabled.

If it says "couldn't connect to compname", open your /etc/hosts file and add an entry for the computer you're trying to connect to.


I think I've covered everything that could possibly go wrong with mounting, so let's move on to sharing.

To share directories on Linux:
1. Open a shell and become root, as described before.
2. Open your /etc/smb.conf file. kedit /etc/smb.conf (replace kedit with your favorite editor if you want)
3. Alter it like so:
1. Change the WORKGROUP setting to the name of the workgroup you want to be in.
2. The HOSTS ALLOW line should contain the list of IP ranges that are on your home network. For example, if your computers were all 192.168.0.* your line would look like this:
hosts allow = 192.168.0. 127.
3. Set ENCRYPT PASSWORDS to "yes"
4. Set SMB PASSWORD FILE to "/etc/smbpasswd"
5. On the INTERFACES line, list all of your computer's IP addresses, except the internet address if it has one. For example, if you computer had a loopback IP 127.0.0.1, an internal IP 192.168.0.1, and an internet IP 25.246.105.108, your line would be:
interfaces = 192.168.0.1 127.0.0.1
6. Save it and exit the editor.
4. Add an account for your Windows box. smbpasswd -a user password
Replace user with the username you want. and password with a password. The username should be a valid user on the Linux box.
5. Open up /etc/smb.conf again.
1. Scroll down to the Share Definitions part.
2. The first chunk would be the homes section. Edit it as neccissary to make it match this:
[homes]
comment = Home Directories
browseable = no
writable = yes
3. Now add any other shares you want like this:
[sharename]
comment = Comment
path = /path/to/share
read only = no
public = yes
4. Save and exit.
6. Now start the samba server. nmbd -D and then smbd -D
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
17-Oct-2003, 11:41 AM #9
RPM UNLEASHED
**************
rpm -qa : list every rpm installed on your system

rpm -ql package-name : list the installed files associated with rpm package-name (it should be noted the version # of the package-name can be omitted. Ex: openssh-2.3.1 can be abbreviated openssh). To list the files in an uninstalled rpm use the same command only add the -p option: rpm -qpl package-name

rpm -qa | grep regexp : check to see if rpm conatining regexp in its name is installed on your system.

rpm -i package-name : install rpm package-name (must be root). Also by adding the --test option you can check for depency problems before actually installing.

rpm -U package-name : same as above only Upgrade instead of just install.

rpm -qi package-name : list info about package-name. This gives you a general idea of what the package does, what system it's intended for and who put it together. You can also query info from uninstalled packages with with the -p option: rpm -qpi package-name

rpm -qf filename : VERY IMPORTANT. Query file filename to see what RPM package it belongs to. This will keep you from deleting a file you think is useless.

One last trick. Many people complain about RPM dependency problems. The easiest way to solve these are by using www.rpmfind.net. You can query by a filename or an RPM name. Also if you know you have all the RPMs required to do an install but don't know which ones to install first you can specify them all on the command line with a glob character '*.rpm' and let the rpm command sort out the dependencies itself.



Report this post to a moderator | IP: Logged

10-16-2003 04:11 PM
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 09:54 AM #10
hey dudes..
Do respond
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 09:55 AM #11
Waiting...
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 09:59 AM #12
Unleash ur secrets..
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 07:03 PM #13
The LOST project (Linux one stanza tips), can be useful in your email. Contains losta tips.

http://lost.sourceforge.net/LOST/info-intro.php
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 07:05 PM #14
healtheworld's Avatar
healtheworld
Guest with n/a posts.
 
18-Oct-2003, 07:06 PM #15
To get those darn windows/dos text files to parse properly, get rid of the carriage return at the end of every line....

code:--------------------------------------------------------------------------------sed -e 's/.$//g' foo.txt -i--------------------------------------------------------------------------------
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:42 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.