LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-26-2004, 05:17 PM   #1
little_ball
Member
 
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176

Rep: Reputation: 30
Linux Tips


I think is a good Idea for all of us to share our Linux tips that we all know.


1- Tired of using Kill -9 ID to closed some running app? not telling that first we had to run ps aux to see the apps. ID. just create an script, call it die (in this case), or whatever you like, just make sure the script have this line inside:

kill -9 `ps aex | grep $1 | grep -v grep | awk '{print $1}'`

save the file, chmod +x it, and put it in your PATH, then every time you want to kill some apps without kill -9 ID, you just use the command line

$die apps

2- want to login always with passwd less? no matter if you are user or root? this maybe is a unsafe option but I had saw people that like that style.

root$ passwd -d root

user$ passwd -d "your user name"

Next time you login, you wonīt have to put any passwd.

3-verify if some apps, is already running.

user$ ps -aux | grep 'application'

4-Want to save 800Kb of ram? instead of login to X with startx, use exec startx.

5- Want to know the size of an certain directory? use command du, like this.

user$ du -sh home

6-want to protect files from write and read? use chattr command as root you could do this to any file or directory.

root$ chattr +i file

want to put your file back like it was use:

root$ chattr -i file

want to know which files or directory are protected with chattr command line? use this:

user$ lsattr

7-Put more than 1 IP to your network cards? you have to have the option "IP Aliasing support, in your kernel, then:

root# ifconfig eth0:0 ip network sub mask
root# ifconfig eth0:1 ip network sub mask

8-Donīt want any user that is not root to use the command su? put in /etc/passwd
root:ALL:DENY

9-Secure passwords, to create more secure passwd as root type:

root# head -c 6 /dev/random | mmencode

mkpasswd is used for this utility.

Keep up sharing your tips.:)

Last edited by little_ball; 06-26-2004 at 05:18 PM.
 
Old 06-26-2004, 05:20 PM   #2
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
or you could just use the pidof command for your first one.

There's a tips and tricks thread floating around here somewhere.

--Shade
 
Old 06-27-2004, 01:42 AM   #3
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
No. 8: the line 'root:ALL:DENY' should go in /etc/suauth, not /etc/passwd.

Enjoy!
--- Cerbere
 
Old 06-27-2004, 04:59 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I find 'find' command usefull if you change your user uid and want to change all files ownerchip to suit your change (recursive)

find / -uid $old_uid -exec chown $new_uid {} \;
 
Old 06-27-2004, 11:41 AM   #5
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Cool more resources

LQ Tricks and hints
The Linux Cookbook
another thread
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux and iPod Tips kvas Linux - Hardware 3 10-10-2005 05:07 AM
Massive list of Linux Tips mdarby Slackware 5 05-15-2005 10:51 PM
100 Linux tips and counting mchirico LinuxQuestions.org Member Success Stories 1 05-05-2005 03:53 AM
Linux Speed Tips RySk8er30 Mandriva 4 02-10-2005 01:21 PM
Linux house cleaning tips? l0f33t Linux - General 2 08-11-2003 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration