Sunday 9 May 2010

Command-Line Tips

Two days ago a read this post in, about the CLI. It's always good to know your way around the CLI in Linux based systems. You never know when you gonna need it next. I liked the tip of using tab to finish commands in the terminal, I didn't know, quite handy.

I would like to add a couple more tips:

  • The first one is not a tip but a refrase of one of the tips in the named post. Just to say that the command "~" is the address of your home directory and it can be used to change, copy or anything.
    cd ~
    cp ~
    And you can also use it like that
    cd ~/Documents/somethingelse/etc/
  • And another tip a friend told me is you can use ctrl+alt+f1 to access the comand line, you can use from f1 to f6 for the command line, and f7 to go back to GUI
  • If you want to kill all the processes:
  • Kill an rogue application using it’s name. Instead of hunting around the System Monitor to kill a rogue application, just killall it
    killall app_name
  • But sometimes is just better to kill what ever is messing with you system, in that case use:
    Look for the process in particular and then use:
    kill 5689 (the number of the Id of the process)
  • If you like using top, install htop is a better version of top.
    sudo apt-get install htop
    To start it just type:
  • Ever entered a command but left off the ‘sudo’ ? Instead of typing the entire thing again, or back-arrowing to the start, just type the following to run the previous command as root.
    sudo !!
  • 2 commands I'm always using and I always forget:
    tocompress: tar -czf nametarfile.tar.gz namefolder
    toextract: tar xvzf tarfile.tar.gz


Post a Comment