Posts

Introduction of Linux

Image
Why Linux? The most important technology for IT professionals to understand is Linux. Linux is used for more than just traditional server applications. 90% of the Fortune 500 use Linux. What makes Linux great? Linux is open source. Easy access to a powerful and scriptable CLI. Linux is modular all the way down. Why do you need to know Linux? Windows and Linux are the major players in the server space. It's likely your application or application's runtime will be hosted on Linux. Cloud instances and/or infrastructure may be based on top of Linux. Linux skills are in high demand in IT job market. Mobile application and IoT projects will most likely be based on Linux OS. Linux innovation Linux has been a major source of innovation in IT. Web 2.0 was built on top of Linux. Big data solutions, software-based storage application, and software-enabled networking are Linux based. Microservices and containerized application are coming f

What is Linux?

Just like Windows XP, Windows 7, Windows 8, and Mac OS X, Linux is an operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply – the operating system manages the communication between your software and your hardware. The OS is comprised of a number of pieces: The Bootloader:  The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system. The kernel:  This is the one piece of the whole that is actually called “Linux”. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the “lowest” level of the OS. Daemons:  These are background services (printing, sound, scheduling, etc) that either start up during boot, or after you log into the desktop. The Shell:  You’ve probably heard mention of the Linux command line. This

What is the difference between break and continue statement? Explain with exemple.

The break statement is used in the loop to terminate the iteration of the loop. At the vary point the break statement is encountered the loop terminates. But in case of continue, when it is encountered, the control of execution ignores the remaining statements in the loop and starts execution from the very beginning statement of the loop. Example for break statement:     int i;     for(i=0;i<=10;i++){     printf("%d",i);     if(i==3)     break;     } Output: 0 1 2 3 When if condition becomes true, the loop terminates. Example for continue statement:     int i;     for(i=0;i<=10;i++){     if(i==3)     continue;     printf("%d",i);     } Output: 0 1 2 4 5 6 7 8 9 10 When if condition becomes true continue is  encountered, the loop ignores the remaining lines in the loop. So 3 has not been printed.

What is The Difference Between Declaration And Definition of a Variable/Function?

Declaration of a variable/function simple declares that the variable/function exists somewhere in the program but memory is not allocated them. But the declaration of a variable/function serves an important role. And that is a type of the variable/function. Therefore, when a variable/function is declared, the program knows the data type of that variable. In case of function declaration,   the program knows what are the arguments to that functions, their data types, the order of arguments and the return type of the function. So that’s all about declaration. Coming to the definition, when we define a variable/function, apart from the role of declaration, it also allocates memory for that variable/function. Therefore, we can think of definition as a super set of declaration. (or declaration as a subset of definition). From this explanation, it should be obvious that a variable/function can be declared any number of times but it can be defined only once. (Remember the basic principle that

How to Create Parrot OS Style Terminal/Bash Prompt on Any Linux Distro

To Change Terminal/Bash Style........ 1. Open Terminal 2. Type cd ~ 3. Then gedit .bashrc 4. Copy Peste This Code To .bashrc File. # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything [ -z "$PS1" ] && return # don't put duplicate lines in the history. See bash(1) for more options # ... or force ignoredups and ignorespace HISTCONTROL=ignoredups:ignorespace # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variab

Directories On Linux Systems

Directories On Linux Systems / : The root directory. Where everything begins. /bin : Contains binaries (programs) that must be present for the system to boot and run. /boot : Contains the Linux kernel, initial RAM disk image (for drivers needed at boot time), and the boot loader. Interesting files: * /boot/grub/grub.conf or menu.lst, which are used to configure the boot loader. * /boot/vmlinuz (or something similar), the Linux kernel /dev : This is a special directory which contains device nodes. “Everything is a file” also applies to devices. Here is where the kernel maintains a list of all the devices it understands. /etc : The /etc directory contains all of the system-wide configuration files. It also contains a collection of shell scripts which start each of the system services at boot time. Everything in this directory should be readable text. Interesting files: While everything in /etc is interesting, here are some all-time favorites: * /etc/cron

HTML Cheat Sheet

HTML Hypertext Markup Language Global Attributes**   ( class | contenteditable | contextmenu | dir | draggable | id | irrelevant | lang | ref | registrationmark | tabindex | template | title ) Tag Info HTML Version Attributes <!-- --> Comment 4 / 5 None <!DOCTYPE> Document Type 4 / 5 None <a> Hyperlink 4 / 5 (href | hreflang | media |  ping | rel | target | type) <abbr> Abbreviation 4 / 5 Global Attributes** <acronym> Acronym 4 - <address> Address Ele ment 4 / 5 Global Attributes** <applet> Applet 4 - <area> Area Inside An I mage Map 4 / 5 (alt | coords | href  |  hreflang | media | ping |  rel | shape | target |  type) <article> Article 5 Global Attributes** <aside> Outside The M ain Flow of T he Narrative 5 Global Attributes** <audio> Sound Content 5 (autobuffer | autoplay |  controls