Tuesday, December 11, 2018

Linux: a necessary ingredient

Here we'll start with a linux operating system, as I'm used to it. One of the most popular distribution of Linux is Ubuntu 18.04(which I'm using currently),17.10, 17.04, 16.04, and 14.04. Other distributions of linux include Mint, Fedora, Kali, Debian, and RedHat etc. Most of the Command Line Interface(CLI) commands are common in all distributions of Linux.Any of following two methods are prior to make your system a linuxee:-
  1. You may run any distribution of Linux as a virtual machine on your system using Vmware Workstation.
  2. Another way to use our requisite is to run it independently or in parallel to your existing Os. Follow these steps : 
       i) You've to download the ISO file from here (Ubuntu 18.04).
       ii) Boot your pendrive with this file.
       iii) Plugin the pendrive, restart your system and install it choosing your preferences in BIOS menu.
You may take the help from here: Installation Guide.

Afterwards,it comes the basics of Linux, that all computer science students must know.
Here are some CLI commands with their functionality :

   0. Open the terminal in user mode using : ctrl+alt+t
  1. pwd: The pwd command allows you to know the directory in which you're located.
  2. cdThe cd command allows you to change directories. When you open a terminal, you will be in your home directory. To move around the filesystem, use cd.
    • To navigate to your desktop directory, use : cd Desktop
    • To navigate into the root directory, use : cd /
    • To navigate to your home directory, use : cd
    • To navigate up one directory level, use : cd ..
    • To navigate to the previous directory (or back), use : cd - ; To navigate through multiple levels of directories at once, use : cd /Desktop/niku
  3. cp: The cp command makes a copy of a file, e.g.  cp file creepy
  4. mv: The mv command moves a file to a different location or renames a file. Examples are as follows: mv file hello renames the original file to hello. mv hello /Desktop moves the file hello to your desktop directory but does not rename it.
  5. rm: Use this command to remove or delete a file in your directory. It does not work on directories that contain files.
  6. ls: The ls command shows you the files in your current directory. Used with certain options, it lets you see file sizes, when files where created, and file permissions. For example, ls ~ shows you the files that are in your home directory.
  7. mkdir: The mkdir command allows you to create directories. For example, mkdir music creates a music directory.
  8. chmod: The chmod command changes the permissions on the files listed.
  9. chown: The chown command allows the user to change the user and group ownerships of a file. For example, chown niku file changes the ownership of the file to niku.
  10. lsb_release -a : to know the current version of your ubuntu.
  11. java -version : to know the current version of jdk.
  12. python --version : to know the current version of python.
  13. mysql -u root -p : to login into sql command line interface
  14. sudo -i R : to login into R command line interface
  15. clear : to cleanout the terminal
Basic root commands : 
For root commands, you have to enter your system login password first.
  1. sudo apt-get update : to get updates of the packages.
  2. sudo apt-get install xxx : to install a softwares named xxx.
  3. sudo poweroffto directly shutdown from your terminal.
You may get a list of entire commands and guidelines from these links stated below :
Hope this article will give you a basic idea for using linux distributions.

Event Handling in Spring

Spring's event handling is single-threaded so if an event is published,  until and unless all the receivers get the message, the process...