Basic Terminal Linux Commands

A few months ago, I decided to switch my PC Operating System from windows to ubuntu. One of the reason I did it because my current company has a policy to migrating OS from windows to ubuntu for some network engineers laptop, including my team but not mine 😃.

Of course this migration not smooth as expected, there are problems such as how to establisihing vpn connection to our intranet office or customer intranet, secure CRT script which we use it to roll out router configrations, office application compatibility and others. Thus, why I decided to change my own PC to ubuntu to help IT team and solve the problems.

I start googling how to use ubuntu, first think I’m curious enough is how to use a terminal. To open the terminal we simply press Ctrl + Alt + T.

Terminal Display.png

These are some basic commands I learned :

  • man

The command-line program man is used for displaying Unix and Linux manual pages (usually called manpages). Manpages are self-contained reference documents stored on the machine’s hard drive. They are usually short, but can be quite long. Ubuntu’s manpage system has a reference for every command-line program, and in many cases it is the only source of information.

Man displays the data using a pager, a type of program that shows files on text-based terminals one screen at a time. On Ubuntu, less is the pager that is used.

antares@antares-H55M-S2:~$ man man

man_man.png

source :

https://help.ubuntu.com/community/man

  • sudo

After I install ubuntu, I went to install updates on my ubuntu system with apt-get update command. But the terminal display notifications and the command won’t run.

apt-get update gagal.png

After did some researches, it caused I’m not ran the command as root account/privilege. I should ran sudo apt-get update with. Sudo means “Super user do!”, is used to give such permissions to any particular command that user want to execute. Sudo requires the user to enter user password to give system based permissions.

apt-get sukses.png

Source :

  1. https://www.linux.com/blog/how-use-sudo-and-su-commands-linux-introduction
  2. https://help.ubuntu.com/community/RootSudo#Graphical_sudo
  • Su

Su command is used to switch from one account to another. If user types only su without any option then it will be considered as root and user will be prompted to enter user password.

su.png

We can use sudo and enter normal user password to switch to root user.

sudo su.png

Source :

  1. https://www.linux.com/blog/how-use-sudo-and-su-commands-linux-introduction
  2. https://help.ubuntu.com/community/RootSudo#Graphical_sudo
  • Gksudo

gksudo is the same thing with sudo, but it is used for graphical operation which works using GUI instead of terminal. Short note form wiki :

You should never use normal sudo to start graphical applications as Root.You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root. (AFAICT, this is all that’s special about the environment of the started process with gksudo vs. sudo).

Example accessing shutter program via command line :
antares@antares-H55M-S2:~$ gksudo shutter

Source :

https://help.ubuntu.com/community/RootSudo#Graphical_sudo

  • Clear

Command clear or Ctrl+L is used for clear the terminal screen.

clear.png

Optimizing MOP documents creation with microsoft access

One of network engineer task is to deploy hardware or logical configuration In existing live network. It can be simple task such insert a module and provisioning it which has no impact in live network or software upgrade which can be impact to whole service in an NE (Network Element).

Even the activity is simple, it will be better if we do it with a method of procedure document, which is document for describes step-by-step sequence of performing an operation including before and after activities to compare and monitor after we perform sequence task(s) to make sure network keep in good performance without anomaly.

When creating MOP document, we can use template which already prepared. But how if there are a lot of NE to deploy? Of course we need to create MOP to each NE and can you imagine how to create 100 MOPs in just an hours? Which basically we can use the template document and only change important parameters such as Hostname, IP address, Location Address, etc. it wil be boring and tiring If we create the MOP and change those parameters manually.

Let’s take a sample, planning team need to upgrade all routers software to deploy certain features. We as an operation team will execute that request. Before execute it, we should create MOP first as we talked earlier. We can create template MOP to upgrade software in each router, assume the routers that will upgraded has a same type of software, so we don’t need to change any sequence steps in MOP. Just change NE ID parameters in order each network engineer clearly know what will they do and what NE will be executed.

Access

the summary steps are :

  1. Create a table database that contain information which will you need to insert into MOP template which you create as word documentGambar Table
  2. Create bookmark in your MOP template for each part that you want to insert a text or parameter
  3. Create VBScript to search what NE that you want to create for MOP document and create script to fill it in word
  4. For point 2 and 3 you can follow this youtube link for the detail (it’s not me who make that video) 🙂
  5. Then you just search the node and fill it in wordGambar Search

for advance parameters or advance task of the MOP, you can develop your VBscript to much it easier.