Showing posts with label Ubuntu Terminal. Show all posts
Showing posts with label Ubuntu Terminal. Show all posts

Monday, September 12, 2011

How to Delete One Word in Terminal

Every day working with Terminal, we need a lot of shortcut to speed up our task. One of my frequently used shortcut is deleting one word in the left side of cursor:

Alt + Backspace
Enjoy!

Tuesday, May 10, 2011

How to Check Ubuntu Version in Terminal

I just curious about how to check Ubuntu version via Terminal. Since I often remote a server and I don't know what version is. Here is the command:
lsb_release -a
Then it will print out some messages like this:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
So I has already know what Ubuntu version used in server. It is Natty. Enjoy!

Warning: Remote Host Identification has Changed!

When we remote a server using ssh, sometimes we get a warning message like this:

Warning: Remote Host Identification has Changed!

What should we do? Just follow a command below the warning.
ssh-keygen -f "/home/hudan/.ssh/known_hosts" -R server_ip_address
Enjoy :).

Sunday, April 10, 2011

Is There any Calculator in Terminal?

Yeah, absolutely. You can use bc package in Linux Ubuntu. This is an arbitrary precision calculator language. Or, we can just call it "bash calculator" (bc). Simply issue this command:
apt-get install bc
Of course you have to be a root when issuing it. Now we will try bc to perform simple arithmetic operation, such as:
echo 2+3 | bc
echo 2-3 | bc
echo 2*3 | bc
echo 6/2 | bc

Run them in terminal and you will get output: 5, -1, 6, and 2. We will use this calculator later in the next tutorial. Enjoy!

Saturday, April 9, 2011

What is Shortcut to Open Terminal in Linux Ubuntu?

I just got the shortcut to open terminal in Linux Ubuntu from my best friend. The shortcut is Ctrl+Alt+T. Haha... enjoy!

Monday, April 4, 2011

[Linux Ubuntu] How to Set Repository in Terminal

Here is the content of source list file located in /etc/apt/source.list. I use this configuration for daily needs and it's enough (write it in one line only). You should edit source.list in root mode.
deb http://kambing.ui.ac.id/ubuntu maverick main universe
restricted multiverse
Kambing is updated mirror and I can easily access this server. Change this address based on your location and nearest repository in your resident. Enjoy!