Friday, February 24, 2012

Ubuntu Networking Configuration Using Command Line

The basics for any network based on *nix hosts is the Transport Control Protocol/ Internet Protocol (TCP/IP) combination of three protocols. This combination consists of the Internet Protocol (IP),Transport Control Protocol (TCP), and Universal Datagram Protocol (UDP).
By Default most of the users configure their network card during the installation of Ubuntu. You can however, use the ifconfig command at the shell prompt or Ubuntu’s graphical network configuration tools, such as network-admin, to edit your system’s network device information or to add or remove network devices on your system
Configure Network Interface Using Command-Line
You can configure a network interface from the command line using the networking utilities. You configure your network client hosts with the command line by using commands to change your current settings or by editing a number of system files.
Configuring DHCP address for your network card
If you want to configure DHCP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card
sudo vi /etc/network/interfaces
Note :- Use vi editor if you don’t have GUI installed
If you have GUI use the following command
gksudo gedit /etc/network/interfaces
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp



Source : http://www.ubuntugeek.com/ubuntu-networking-configuration-using-command-line.html

Saturday, February 18, 2012

Mounting Linux Partitions in Ubuntu

  • sudo cp /etc/fstab /etc/fstab_backup 
  • sudo nano /etc/fstab 
  • UUID=d1d0cf46-958f-4a12-a604-0ac66040648b /storage ext4 defaults 0 0
  • sudo mount -a
  • sudo chown -R jessica:jessica /storage
  • sudo chmod -R 755 /storage 

Source: http://www.psychocats.net/ubuntu/mountlinux

Sunday, December 18, 2011

Change User/Group Attributes to a File

It's very simple.

For User:
chown username filename
chown username directoryname

Recursively:
chown -R username directoryname

For Group:
chgrp groupname filename
chgrp groupname directoryname

Recursively:
chgrp -R groupname directoryname

-----
Change groupname and username at the same time.
chown username:groupname filename
Change username and groupname at the same time recursively.
chown -R username:groupname directoryname

Source: http://www.mysysad.com/2006/09/change-group-attributes-to-file.html

Monday, October 31, 2011

Restore Panels In Ubuntu Back To Their Default Settings

Messed up your panels in Gnome? Maybe your new to Ubuntu and accidentally deleted items or the panel itself and now you can't figure out how to get it back.

Once the Terminal window opens, enter the following command at the prompt:

gconftool-2 --shutdown

(Note: There should be no spaces between the two dashes before shutdown.)

EDIT – there is another method instead of shutting down gconfd. Instead use the following command.

gconftool --recursive-unset /apps/panel

(Remember: There should be no spaces between the two dashes before shutdown.)

Then enter the next command:

rm -rf ~/.gconf/apps/panel

And enter one more command:

pkill gnome-panel


Both top and bottom panels will appear (if missing) with their default settings. Now you can customize them to your preference and get on with using Ubuntu.

NOTE: This method will work in Gutsy Gibbon (7.10) and Hardy Heron (8.04) version of Ubuntu.

Wednesday, October 19, 2011

Skype video with Ubuntu

How to launch Skype + V4L2 directly from Gnome menus so that the webcam works:
Menu System --> Preferences --> Main Menu
In the window select Internet, then Skype
Click on [Properties] button
In Command enter:
bash -c 'export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so; skype'

http://ubuntuforums.org/showthread.php?t=966882&page=3

https://wiki.ubuntu.com/SkypeWebCams

Tuesday, September 13, 2011

Listening to online radio stations under Linux

Method 1
Tuning into your favourite online radio stations without needing to open a dedicated music application is a breeze using RadioTray. The application runs directly from your system panel with a menu-only interface – thus making it very straightforward to use. Just don’t expect a fully featured bells-and-whistle jukebox for all RadioTray wants to do is give you access to your favourite radio stations with as few clicks as possible – a goal to which it admirably lives up to. Download RadioTray  

Method 2
I feel like a kid in a candy shop. I installed streamtuner today. Streamtuner makes thousands (no exaggeration) of internet music stations available to you. This includes all shoutcast and live365 stations. You also need to have xmms or beep-media-player or somesuch player that can play playlists. So: $sudo apt-get install streamtuner xmms and you are set! Now you can search or browse through the thousands of streams and pick the one you want to hear.

More>>
http://www.omgubuntu.co.uk/2010/06/listen-to-radio-stations-in-ubuntu-using-radiotray/ 
http://embraceubuntu.com/2006/04/05/listen-to-and-record-internet-music-radio-stations/ 
http://www.webupd8.org/2010/07/listen-to-internet-radio-in-ubuntu.html
http://www.liberiangeek.net/2010/06/listen-to-internet-radiomusic-in-ubuntu-10-04-lucid-lynx/ 
http://www.brighthub.com/hubfolio/matthew-casperson/articles/73046.aspx  

Radio Stations in Sri Lanka
http://en.wikipedia.org/wiki/List_of_radio_networks_in_Sri_Lanka
http://www.asiawaves.net/sri-lanka-radio.htm 
http://radiostationworld.com/locations/sri_lanka/radio_websites.asp

Saturday, September 10, 2011

How to change computer name in Ubuntu

Computer name is normally given during the OS installing phases. But you could easily change the computer name with a simple GUI tool which is there in Ubuntu by default.There is a command line tool as well if you are so particular.GUI tool is simple and easy to use.Here is a step by step guide on how to change the computer name.

Using GUI

Go to System -> Administration -> Networking

Network settings

General Tab -> Host Settings -> Hostname: Specify the computer name

save changes and restart your computer.

Using command line

Goto terminal and type the following

sudo gedit /etc/hostname

Change your hostname Also take a look at /etc/hosts. And change your old name to your new one too.

Source : http://ubuntumanual.org/posts/143/how-to-change-computer-name-in-ubuntu