Airtel and MTN SMS center number for cyanogen modded android phones


As you already know, I modded my Samsung Galaxy S2 with CyanogenMod 

At the beginning of this month I noticed something very disturbing.
I got a happy new month message from a dear friend and I tried replying and no way. I tried and tried repeatedly, I kept getting message not sent. I googled the MTN SMSC code and as expected it was still +2348030000000, I tapped that into my modded android phone and got an error. I googled all the combination of mtn + android + sms + message + error + can't send and no suggestion found worked. I switched on and off the phone severally, no result.

So for more than 8 days I couldn't send an SMS.
Then suddenly on Wednesday, like a flash bulb, an idea lit up in my head. I removed my Airtel SIM from my Blackberry and put the SIM in the android phone, then I went to the settings to see the SMSC number. To my surprise it was 089132420000000f8 instead of +2348020000000 that is in the documentation. I tried sending an SMS and it was successful. 
So I did what anyone would do.

Mastering Linux vi editor


vi editor is a very powerful text editor that comes pre-installed on all Linux OS.
vim is variant of vi editor, basically an improved version. Practically, it is more error tolerant than vi.
There are two modes –
Command mode, which is the default mode. You basically scroll through the file content or enter commands.
h moves the cursor to the left,
l moves it to the right,
k to move up, and
j to move down
dd  will delete current line
:w to save (write) the changes made
:q will exit the editor

:q! will exit the editor without saving changes
Text input mode. You enter this mode by pressing the Insert key. There are some basic guidelines to note -
don’t attempt to scroll or change the cursor position in this mode, position the cursor where you want to add extra text before changing to the text input mode. The only exception is when you are using vim.
To change to this mode pressing -
a will append, move the cursor one position to the right before switching to the inserting mode
i will insert
o will insert a blank line under the current cursor position and move the cursor to that line
Vim is better, just not as pre-installed on Linux OSs as Vi.
Run vimtutor to start a recommended 30 minutes tutorial on using vim.

Manipulating Linux command line output


The following are ways to manipulate the screen/standard output of any Linux command,
Piping the output to another command using |
Redirecting output via >
Redirecting output via >> (to append)
Redirecting only errors via 2>
Redirecting standard input via <
Use tee option with | (pipe) to copy input to standard output (terminal) and more than one output files. e.g. cat original | tee copy1 copy2

Use tee –a to append to files. e.g. cat file.txt | tee -a file_all.txt
Grep: It scans output line per line, searching for matching patterns.
All lines containing the pattern will be printed to standard output. e.g. cat countriesandcapitals.txt | grep Nigeria
This can be reversed using the –v option.
 Sort: It allows you to sort the output lines before displaying.
Default is in alphabetical order. e.g. cat alphabets | sort
It can also sort by file size, when sorting ls output. e.g. ls ~/ -la | sort -nk 5
And when used with uniq, it can sort and filter out double entries. e.g. sort itemlist | uniq

Setting file permissions in Linux


All files in Linux have permissions set (or unset) for user, group and other users. It’s indicated as –rwxrwxrwx or similar.
To display a file’s permission settings, type ls -l filename
The first character indicates the filetype e.g. ordinary file, directory…
The next 3 characters indicate the permission for the file owner (user), then next 3 for users in the owner’s group and the last 3 for other users.
r = Read  w = Write  x = Execute
Easiest way to change a file’s permission is to use chmod u/g/a +/- rwx filename e.g. chmod a+w file.txt to give everyone write permission on the file, file.txt
You can also use numeric arguments and common ones are –
chmod 400 to give only read permission to owner
chmod 600 to give read and write permission to owner
chmod 644 to give everyone read permission and the owner write permission
chmod 775 to give everyone read + execute, owner + group read write execute permission
chmod 777 to give everyone read write exceute permission

Simple Linux Command line file text manipulation tips


This is going to be short and straight to the point.

Use cat file.txt to display the content of file.txt on the screen
Use cat file.txt | more to display the content of file.txt one page at a time
Use cat file.txt | less to enable scrolling. Press q to exit/end.
Use tac file.txt to display the content of file.txt in reverse
Use cat file1.txt > file2.txt to copy content of file1 to file2, file duplication.
Use cat file1.txt >> file2.txt to append content of file1 to file2.
Use tail -10 file.txt to display the last 10 lines in file.txt
Use head -10 file.txt to display the first 10 lines in file.txt

Useful Linux command line tips


Linux has become extremely easy to administer. And can be administered using GUI applications or using the Command line Interface (CLI)
As a professional Linux administrator, you’ll have to know how to administer the OS via the CLI
Linux supports multi-tasking, several users using the OS simultaneously.
By default 7 users can work simultaneously (without anyone logging out). 6 Commandline users and 1 GUI user. To switch use CTRL + ALT + F1 (F2,F3,F4,F5,F6,F7) . CTRL+ALT+F7 takes you to the GUI one
From the GUI, you can always access the command line via “Terminal”

Below are very useful command line tips

Understanding the different file types in Linux


Ever wondered why you see different colors when you do ls in linux?
In this post I'll show you what each color stands for. 

In the screenshot below, I did ls -l which will show extra details - file type, file permission, file owner, owner's group, date of creation/modification and file name.
'Cos I did this on my android phone which runs a stripped version of Bash shell, the colors aren't showing. If you do this on a Linux PC, the file names will be colored differently.

Learn Unix/Linux


Want to put your Unix/Linux skills on steroid?
Checkout the presentation below

Making programs and commands run on user login


This week while installing Oracle 11g on Oracle Linux Server, I needed to automatically start some programs when the user logins in.

Here is why. Oracle Linux boots, by default, into a command line terminal or console. But to use the Oracle 11g Database Control application, you'll need to start the GUI X window. The command to do that is $ startx
The other issue is, the GUI launches into a blank desktop, no applications center or start menu bar. To start any program you'll have to right click, launch the Terminal and start you program via the command line.
For me this is no issue, but the intended end user of this Oracle 11g aren't that Linux savvy. I wanted them to just start the system and the X window would start automatically once they login and the dbconsole would be started too and finally Firefox would launch and open http://localhost:1158/em automatically.

Well, it was easy to accomplish. All I did was to edit the ~/.bash_profile file. I added the following lines -
emctl start dbconsole
firefox http://localhost:1158/em

And voila, that did it.

How to set system environments permanently for a user


I finally got Oracle 11g installed on Oracle Linux Server, it was no easy task. I had to edit so many kernel or system settings files.

To run Oracle, I had to set $ORACLE_UNQNAME to orcl each time I login to the Linux. And the command to start up the dbconsole, aarghh, it was a pain to type out - /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
I'm yet to forget it.

Well, I decided to fix this once and for all. And all I did was to edit the ~/.bash_profile, added the following lines -
export ORACLE_UNQNAME=orcl
export PATH=$PATH:/u01/app/oracle/product/11.2.0/dbhome_1/bin

So now I no longer need to set the ORACLE_UNQNAME=orcl anymore as it is been done for me. And the long path to emctl command has been added permanently to the system PATH. All I now do is type
emctl start dbconsole
and voila, I'm done.

How to install the wireless driver for D-link RaLink 5360 dwa 525 on Ubuntu 12.10


Recently, my boss has been having issues with his Windows 7 OS and decided to change to Linux. So as a pilot test, he installed Ubuntu 12.10 on his work PC and plans to install it on his laptop too.

Well, his PC has a D-link wireless card dwa 525 with RaLink chipset 5360 and to my surprise Ubuntu 12.10 doesn't have its driver preloaded. But Ubuntu 13.04 has. So in this post I will show you how I fixed the issue with special help from chili555 on this Ubuntu Forum Thread

I couldn't access the internet from the PC, so I had to download the driver from another PC connected to the internet.

Very useful Linux administration commands


Love Linux Live Linux (c)

I primarily use Linux on my laptop, I have both Ubuntu 12.10 and OpenSUSE 12.2 running on the laptop. And been having at least 2 linux distros on the laptop since 2009.

In this post I will share with you, some very useful linux commands -

man any_command  the manual for target command>
ls files in current directory>
ls  –a maximum information about all files, including hidden>
mv source destination  a file or directory>
rm target 
cp source destination  file or directory>
mount /dev/device_name /media/device_name filesytem>
umount /media/device_name <Unmount>
df –h filesystem and available disk space  in KB, MB, GB>
ps – ef all running processes, with full details>
top system monitor showing a more extensive view of all processes and system resources>
nohup command & a process in the background and have it keep running after you log off>
~/  user's home directory>
ifconfig  network interfaces>

iwconfig  wireless network interfaces>
ssh username@ip_address  to a remote server>
ping ip_address  to see if target is online and responding>
traceroute6 ip_address  network route to target>
iptables –L  firewall rules>
adduser a new user>
usermod user privileges (be very careful with this one)>
chmod <# Change privileges over file or directory >
chown user_name:group_name directory_name owner of a file or directory>
su username  become a different user>
users usernames of logged in users>
Infact, you can administer your mysql database directly from the CLI
CREATE DATABASE databasename; 
CREATE USER username@localhost IDENTIFIED BY 'password'; a new user>
show tables;  database schema>

Know other useful Linux commands? Please share via the comment box.

Learning Linux? Free online books and practical help tips


Well just in case you still do not realize that I am typing this post on a Linux OS. Checkout the following screenshot.

Yes, I am typing out this post from my Ubuntu Linux OS, and I also have OpenSUSE, Windows 7 RC & Windows 8 RC(no $ to buy commercial version) all running on the same laptop, my venerable SONY VAIO.

So how did I learn to use Linux?
It all started in 2008. I started from ground zero. I was at the peak of my IT certification frenzy and I heard of this Linux + certification, so I decided to attempt the certification. I had done Oracle 10g Certified Administration Associate (OCA 10g) and Cisco Certified Network Associate (CCNA). 

I spoke with a senior colleague, and he was too busy to even hear me out. I proceeded to help myself, I downloaded Ubuntu 8.04 alternate CD (my greatest mistake in IT, so far) and ended up irreparably crashing my Windows. The problem was that I downloaded an alternate CD, fortunately Ubuntu no longer makes alternate CDs (I think). Alternate CD is purely a commandline based installation CD, and I knew nothing about Linux file structure - root folder, home folder, ext2 file system, swap space... I got stuck for what seemed like an eternity at specifying root file and choosing file system, it won't let me choose NTFS and I knew jack about the other options. Finally, after trying out so many combinations, it finally accepted one. I had installed my first Linux OS all by myself, without any help. I was extremely happy, even though my Windows was gone.

Ever since, I have grown in my understanding and use of Linux. I have installed Linux for over 20 people, installed nearly all the free distros and have been quadri/penta-booting OSs on my laptop since 2009. And I now train people on how to use Linux.

How did I achieve my expertise?
I read all I could on Linux. I kept practicing, sharing my knowledge and helping people solve their computer problems with my Linux knowledge. It got me the fix-it guy status among my friends.
Reading and practicing is the only way to learn Linux.

Where can you get good Linux books for free?
Linux prides itself as being free. And so many people have put up their Linux how-to books for free online. And a good starting point will be - 

Introduction to Linux

Linux Newbie Administration Guide

Bash Guide for Beginners

Ubuntu Pocket Guide & Reference

I assure you that reading this book and practicing on a real Linux system, you'll become a Linux guru too.

Follow me on Twitter | About me | Terms of Service | Privacy Policy