Joined: 21 Jun 2004 Posts: 85
Location: Dhaka,Bangladesh
Post subject: When linux hangs
If Somehow you can make linux hang and u are in text mode then
fuser -km /
which closes all the terminal windows at once.
Whenever You logon in linux it shows the prompt like [root@localhost root] .
To see your name in it like [root@localhost Tanveer] do this
1. open /etc/bashrc using vi /etc/bashrc
2. edit this line [ "$PS1" = "\\s-\\v\\\$ ] && PS1="[\u@\h \W]\\$ "
just change it as [ "$PS1" = "\\s-\\v\\\$ ] && PS1="[\u@\h Tanveer]\\$"
3. Then open another console which will show [root@localhost Tanveer]#
Again if u are viewing a large file using vi editor then to find a particular word you don't have to go through all the lines. just open the file suppose
1. vi /etc/passwd -- where all the users list with passwd are given
2. If u are searching for username nibir then just type /nibir[in command mode]
there are two modes in vi editor. a) command mode b) edit/insert mode
3. Press Enter and it will take u to the line where the word nibir is.
If "nibir" is there more than once then just keep pressing 'n' and it will find by searching whole file where else the nibir word is.
Hope these helps.
Sun Sep 26, 04 11:17 am
dude Power User
Joined: 10 Mar 2004 Posts: 376
Location: Savar, Dhaka
Post subject:
Good trick. Thanks Tanveer.
I wonder where did our linux specialist aronnok hide, who was so eager to have a seperate linux forum. Can't say I am very much surprised.
Sun Sep 26, 04 11:43 am
dinangkur Super Moderator
Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
Post subject:
May be he is having tough time with his black box
-DK _________________ ...we too are stardust...
Mon Sep 27, 04 5:05 am
tanveer User
Joined: 21 Jun 2004 Posts: 85
Location: Dhaka,Bangladesh
Don't mind aronnok. We always like to think the best should happen to other people. It is better that you were hiding than be sick. We are glad that you are alright now. _________________ “You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh