28 June, 2010

important bash commands for system administration


As you know the terminal is the power tool that every linux user may have to come in contact even once in their computer life. Here is a post about controlling and managing your system using the gnome terminal.

How to shut down the system
 

$shutdown -h now

The word 'now' is enough to shutdown the system at this instant itself. You must be sudo before executing this command. You can specify the time instead of the word 'now' so that the system will shut after that time limit. Other  valid  formats  are  +m,  where m is the number of minutes to wait until shutting down and hh:mm which specifies the time on the 24hr clock.

       -r     reboots the system after shutdown

       -h    Requests  that  the system be either halted

              or powered off after it has been brought 
              down

       -c    Cancels  a  running  shutdown.   TIME is not 

              specified with this option, the first     
              argument is MESSAGE.

       -k    Only send out the warning messages and 

              disable  logins,  do  not actually bring the 
              system down.

How to take the root shell prompt
 

You can take the root shell prompt using the root password as follows

$ sudo su
 

How to switch between virtual consoles

In most debian based systems there are six switchable VT100-like character consoles available to start the command shell directly on the Linux host. Unless you are in a GUI environment, you can switch between the virtual consoles by pressing the Ctrl - Alt keys and one of the F1 --- F6 keys simultaneously. Each character console allows independent login to the account and offers the multiuser environment. You can get back to the X Window System, normally running on the virtual console 7, by pressing Ctrl - Alt - F7

Alternatively we can use the command chvt to  switch between virtual consoles from the command line
 

$ chvt  3        (switches to 3rd console )

 

How to quit the terminal

Press Ctrl + D to terminate the shell activity.



To create a new user account 


To create a new user account from the terminal type in as follows...


$ adduser carbon


This will add the user with name 'carbon'.  You can remove this user and it's home directory by using the following command.

$ deluser --remove-home carbon
 



Read rest of entry

12 May, 2010

Speed up the startup and shutdown process in Windows XP : registry tweak

Let's try some trick for increasing the speed of booting and shutting down of Windows XP through the group policy editing. 

Open the RUN command using Windows+ R key combination or from the  start menu and type notepad.

In NOTEPAD, copy del C:windowsprefetch tosboot-*.*/q

And save it as ntosboot.bat in your computer

Again open the RUN command and type gpedit.msc 

Click on the COMPUTER CONFIGURATION in the left side pane , under that double click WINDOWS SETTINGS and then double click on the  scripts in the  right pane



 
Again Double Click on the SHUTDOWN in the right window. Then click the  ADD button and then BROWSE to select the saved file ntosboot.bat and open it. (shown in figure)


 

Choose OK and APPLY , Once again click OK and then exit.

Now open the device management window. Take the RUN prompt and type in as  devmgmt.msc

A new window will open under that double click on IDE ATA/ATAPI controllers. Right Click on Primary IDE Channel to select properties
(Shown in the figure)
 
 

Choose the tab called ADVANCED SETTINGS then click on the device 0 or 1, The device contain device type which is not highlighted and chose none in the place of autodetect and Click OK


Now select Secondary IDE Channel and select properties and repeat the process as done above.
 
That's all  for the time being. Just restart your system to see the changes.

Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger