Ubuntu Quick Reference
Wednesday, December 27, 2006
As much as I use Ubuntu, I still often wonder what the right command is
for certain tasks, or can’t remember the syntax. This is intended to be
a list of common Ubuntu tasks and commands, mostly from the command
line, because it’s freaking linux, and why wouldn’t you use the command
line? This isn’t a guide on how to install software on Ubuntu, even if
there are a few notes on that in this document.
for certain tasks, or can’t remember the syntax. This is intended to be
a list of common Ubuntu tasks and commands, mostly from the command
line, because it’s freaking linux, and why wouldn’t you use the command
line? This isn’t a guide on how to install software on Ubuntu, even if
there are a few notes on that in this document.
| Checking Ubuntu version Info |
|
| cat /etc/issue | Gives you the Ubuntu version number: ” Ubuntu 6.06.1 LTS “ |
| uname -r | Gives you the running kernel version |
| Checking Performance Stats | |
| cat /proc/meminfo |
Gives you a breakdown of memory usage. |
| Using root mode | |
| sudo -s -H | Switches to root mode as root user (home directory will be root’s) |
| sudo -s | Switches to root mode, but as current user. (home directory will be the same) |
| Setting up VMWare tools (ubuntu as guest) |
|
| sudo apt-get install build-essential sudo apt-get install linux-headers-`uname -r` < regular vmware tools install for tar install> |
I’ve always had to compile the vmware tools during the install, which requires the linux headers and the build tools. This is what is necessary from a basic install to get to the point of being able to install the vmware tools. Note that as new versions of VMWare workstation come out, this will no longer apply. |
| Installing Ruby on Rails |
|
| Make sure you have edited your sources.list to include the universe repository |
|
| sudo apt-get install ruby sudo apt-get install ri sudo apt-get install rdoc sudo wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz < or download rubygems.0.x.x.tgz from RubyForge > tar -xvzf rubygems-0.9.0.tgz cd rubygems-0.9.0 sudy ruby setup.rb sudo gem install rails –include-dependencies |
Install Ruby, addons such as RubyGems, and then use RubyGems to install Rails |
| sudo apt-get install mysql-server sudo apt-get install libmysql-ruby |
If you are planning on using Mysql with rails, you’ll want to run these commands. |
| sudo apt-get install sqlite3 sudo apt-get install libsqlite3-ruby |
Use this to install sqlite along with the ruby bindings |
| Upgrade from Hoary or Breezy to Dapper |
|
|
sudo sed ’s/hoary/dapper/g’ sudo apt-get update |
Update your sources.list to point to the Dapper repository, and then use the regular system upgrade commands to update. If you are upgrading from breezy to dapper, then change the s/hoary/dapper/g part to be s/breezy/dapper/g |
June 7th, 2009 at 10:16 am
this is what i’ve been looking for.. thanks a bunch..