Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, October 23, 2007

Ubuntu 7.10 (Gutsy Gibbon)

Gutsy Gibbon is the codename of the latest Ubuntu 7.10 released last October 18, 2007, but I've waited a little while before upgrading from Feisty Fawn (v7.04). Its because I was anticipating some problems during the upgrade, so better wait for others and their experiences, then probably for the solutions =)

That's right! Yesterday, I was brave enough to do the upgrade. Just clicked the update notification icon to install some (security) updates. When the update was done, the Upgrade notification flashed, ready to install.

It took some hours to finish the Ubuntu upgrade. Then, the VMware Workstation needed to be re-setup (as always) because some vmware modules need to be recompiled according to your running kernel version.

Note: To check your current kernel version, type uname -r at the console.

Whenever you need to install/re-install VMware on Linux, always remember the vmware-any-any* patch because you'll most likely need it for recompiling some vmware's components, like vmmon, etc.

And whenever you need it, just look for the updated version because its also being modified regularly. Thanks to the readily available solution to my problem:
http://ubuntu-tutorials.com/2007/09/26/how-to-install-vmware-server-on-ubuntu-710/

As I've said, its worth it for the wait ;-)

Thursday, September 13, 2007

Some Linux shortcuts

While some of them are very common, you might still learn some, as I do.

# / - root directory
# ./ - current directory
# ./command_name - run a command in the current directory when the
current directory is not on the path
# ../ - parent directory
# ~ - home directory
# $ - typical prompt when logged in as ordinary user
# # - typical prompt when logged in as root or superuser
# ! - repeat specified command
# !! - repeat previous command
# ^^ - repeat previous command with substitution
# & - run a program in background mode
# [Tab][Tab] - prints a list of all available commands. This is just an
example of autocomplete with no restriction on the first letter.

# x[Tab][Tab] - prints a list of all available completions for a
command, where the beginning is "x''

# [Alt][Ctrl][F1] - switch to the first virtual text console

# [Alt][Ctrl][Fn] - switch to the nth virtual text console. Typically,
there are six on a Linux PC system.

# [Alt][Ctrl][F7] - switch to the first GUI console, if there is one
running. If the graphical console freezes, one can switch to a
nongraphical console, kill the process that is giving problems, and
switch back to the graphical console using this shortcut.

# [ArrowUp] - scroll through the command history (in bash)

# [Shift][PageUp] - scroll terminal output up. This also works at the
login prompt, so you can scroll through your boot messages.

# [Shift][PageDown] - scroll terminal output down

# [Ctrl][Alt][+] - switch to next X server resolution (if the server is
set up for more than one resolution)

# [Ctrl][Alt][-] - change to previous X server resolution

# [Ctrl][Alt][BkSpc] - kill the current X server. Used when normal exit
is not possible.

# [Ctrl][Alt][Del] - shut down the system and reboot

# [Ctrl]c - kill the current process

# [Ctrl]d - logout from the current terminal

# [Ctrl]s - stop transfer to current terminal

# [Ctrl]q - resume transfer to current terminal. This should be tried if
the terminal stops responding.

# [Ctrl]z - send current process to the background

# reset - restore a terminal to its default settings

# [Leftmousebutton] - Hold down left mouse button and drag to highlight
text. Releasing the button copies the region to the text buffer under X
and (if gpm is installed) in console mode.

# [Middlemousebutton] - Copies text from the text buffer and inserts it
at the cursor location. With a two-button mouse, click on both buttons
simultaneously. It is necessary for three-button emulation to be
enabled, either under gpm or in XF86Config.
---

Read more..

Tuesday, September 11, 2007

How to assign hot key to Ubuntu?


1. Press Alt-F2 to open the Run application menu bar. Type gconf-editor and press Run button.

2. The Configuration Editor will show up. Go to /apps/metacity/keybinding_commands key (similar to Windows' registry) and double-click the unused name key, for example command_1. It is usually String type to accept command string. Input the name of the executable or command in the Value text box. For example, in the screenshot, I typed Konsole for the KDE terminal console executable.


3. Then go to
/apps/metacity/global_keybindings as shown in the screenshot below. Find and double-click the binding key associated to your command key in step #2. For example, run_command_1. Assign a shortcut key by typing it to the Value text box. This will be your shortcut whenever you want to run the command/executable in step #2. In my example, I chose K to open a KDE console terminal. You may choose your own preferred short cut combination, like combination of , and a letter. Click OK's and close the Configuration Editor. You may now try your shortcut key!

4.You can add more shortcut key for all your frequently used programs.










Wednesday, April 25, 2007

[Tip 0.3] ln: do you like it soft or hard?

ln is a linux command to create a symbolic link to a file. The link could be hard or soft.

Hard Link:
- create another file (or entry to directory file) that reference to the same inode number (or disk block/s).
- attributes/permissions are carried out when the file has been changed/removed
- apply for files only (not directory)
- can not span hard drives (ie. hard link in /dev/hda/ that points to a file from /dev/hdb)

Example:
How to create a hard link 'tlink' that points to test (must be file only, NOT directory):
rex@rexubuntu:~$ ln test tlink

How to create another hard link 'tlink'2 that points to test (must be file only, NOT directory):
rex@rexubuntu:~$ ln test tlink2

How to identify hard links? Issue the command below and check for the same inode numbers:
rex@rexubuntu:~$ ls -il
8437999 -rw-r--r-- 2 rex rex 0 2007-04-25 15:02 test
8437999 -rw-r--r-- 2 rex rex 0 2007-04-25 15:02 tlink
8437999 -rw-r--r-- 2 rex rex 0 2007-04-25 15:02 tlink2

Having the same inode numbers means that the files: test, tlink and tlink2 are three files pointing to the same inode/s or disk blocks. Just think of them as 2 copies of test.

Soft Link:
- analogous to Windows shortcut file. It contains the path of the target file, and when the target file has been removed/deleted, the soft link is broken.
- file that contains the path of another file

Example:
How to create a soft symbolic link named 'slink' that points to file 'test' (could be a file or directory):
rex@rexubuntu:~$ ln -s test slink
rex@rexubuntu:~$ ls -il
8438031 lrwxrwxrwx 1 rex rex 4 2007-04-25 15:18 slink -> test

Note: test file should be existing

How to display soft links? Symlinks end with @ when you use the command:
$ ls -F
slink@

or

$ ls -l
lrwxrwxrwx 1 rex rex 4 2007-04-25 15:18 slink -> test

What if..a malicious software (malware) creates multiple (random) hard links to itself to avoid being completely deleted from the system. How would you completely clean the infection? Ok, lets say you were able to spot the file and terminate the process and delete the file. Then the next morning, you see another instance/copy of the malware. You suspect that there could be more other copies of itself that are still lurking in your system. So in order to remove all the copied files of the malware in your system you gotta be able to find all of its copies. So the next question would be: how would you know all of its instances or copies when you got one of its hard links or copies manually?

Well, first lets define inode. inode is the data structure that stores information about a file in Unix file system. Its number uniquely identifies the file. Its a basic building block of the file. So a file must have atleast one inode that also contains info about the data, permission,etc of the file. A file contains the (a) data and (b) filename parts. The data part is associated with inode structure and the filename is associated to name of the file and the inode number.

How to identify all hard links pointing to the same inode? There's no single command that would do this. It requires a little scripting and filtering. So its your choice. But basically, you have to search from the root directory and checking their inode number with the inode you identified as your input. I've found a simple solution from googling and it worked:

find <location> -samefile foobar
where foobar is a found link(whether original or not) and <location> is where you want to search. (ie. / to get all of them).

Another approach is:

find <location> -inum nnnnnn
where nnnnnn is the inode number of the known file that you established with "ls -li".

How to remove a link:
$ rm <linkname>
Remember that in *NIX world, everything is a file or directory. So rm would work.


Thursday, April 19, 2007

Ubuntu 7.04 (Fiesty Fawn) released!

Yes, today is the scheduled released of the much awaited Fiesty Fawn!

More info below:

http://www.debianadmin.com/ubuntu-704-feisty-fawn-release-dates.html

http://distrowatch.com/?newsid=04178


Now, its time to update my Ubuntu 6.10 (Edgy Eft) to Fiesty Fawn!!
Note: Ubuntu requires an incremental upgrade. If you're using Ubuntu 5.10, upgrade to 6.10 first before you can go to 7.04.

But its as easy as running the System->Administration->Package Manager. It should prompt you to install any available updates including upgrades.


If not, you can manually click the Check update button to check and get the updates! If you click the Install Updates button, it first will install some application updates. Clicking the Upgrade button will start the upgrade process. Then the release note is displayed. Click Upgrade button and you're on your way to upgrade your Edgy to Fiesty.

You'll be asked for the password since its a system-wide change.

Then it will prepare the distribution upgrade before prompting to proceed the real upgrade.

Depends on your internet speed, the upgrade could take hours or even days to complete. After the upgrade you can check if it indeed has been upgraded. Some of ways to check your Ubuntu version are like:

cat /etc/issue

or

lsb_release -a


or

cat /etc/lsb_release

That's how you upgrade using the GUI. Smooth. :)

If you're a CLI guru, then you can upgade using apt-get command (not advisable). If you want some pain in the ass, try it the hard way, check how here or there .

So whats up with this upgrade foo??!

Shuttleworth said “the main themes for development in this release will be improvements to hardware support in the laptop, desktop and high-end server market, and an aggressive adoption of emerging desktop technologies.”Ubuntu’s Feisty release will put the spotlight on multimedia enablement and desktop effects. We expect this to be a very gratifying release for both users and developers”.

“Edgy has been a wild ride, with some remarkable achievements (nothing like re-inventing and substantially improving on init!). Feisty will be a little more focused on features that are very visible to end-users,”