How to create symbolic links in Linux

Symbolic Links are basically a link to some application. They save your time to everytime go to that particular folder deep into the directory structure to start your application. We can create a symbolic link by :- ln -s location_of_your_link  your_term_for_link Example ln -s /usr/local/bin/eclipse eclipse now when you type eclipse on terminal, it will go to that location_of_your_link...

Contiguous Memory Allocation?

Contiguous Memory Allocation Contiguous memory allocation is a classical memory allocation model that assigns a process, consecutive memory blocks (that is, memory blocks having consecutive addresses). ...

What is a socket in networking?

A socket is one endpoint of a two-way communication link between two programs running on the network.  A socket is a combination of the port number and the IP address, so that the TCP/UDP layer can identify the application that data is destined to be sent to.  Take an example of an apartment building ( World Famous Analogy) The street address of the building...

What's a Memory Leak?

A memory leak is like a virtual oil leak in your computer.  It will slowly drains the available memory, reducing the amount of free memory the system can use.  Most memory leaks are caused by a program that unintentionally uses up increasing amounts of memory while it is running.  This is typically a gradual process that gets worse as the program remains open. If the...

How to do persistent mounting of a partition over a reboot?

Sometimes, we manually mount a folder but if we do a reboot, it doesn't stay there.  So, How to mount a partition so that it remains persistent over reboot ? mount --bind /source/folder destination/folder Type the following in the /etc/fstab file source/folder                destination/folder                ...

Creating File in CentOS Docker container

< Previous Let's create a file in the centos container. So, you can see above - I have a created a directory in my Centos Container (ae358738....) called Sample - I have created a SampleText.txt file in it - I exited the centos docker container Now, to check...

Exiting Ubuntu Docker Container

< Previous Next > Now, to exit this UBUNTU docker container, simply type exit now, to see the history of container you created, exited, on-going etc, type To see only running containers, Remember, if you open a ubuntu image 3 times, so, every time, there will be a...

Lets run Ubuntu using Docker

< Previous Next > So, I am running Fedora 20 on my Dell XPS machine But, I want to run UBUNTU , so here comes the run command in the picture here, -it = interactive in Linux language Voila...!!!!!! That's amazing, and now we are in Ubuntu...

Docker commands (cont.)

< Previous Next > To grab the image and download, docker has a pull command (sudo docker pull --help) if well an image without tag, for instance it will download multiple images of ubuntu as shown below So, to avoid this downloading of multiple images,...

Docker Commands

< Previous Next > To get idea about any docker command For instance Output To search for an image from the terminal, This will show the similar results you saw on the registry webpage To get the top results for example with more...

Docker

Docker is a virtualization technology like virtual box or vmware. Allows multiple OS with multiple functionalities The idea of docker is to virtualize all the apps on one Operating System. So, I can run  multiple virtualization functionalities on a single OS and having those functionalities isolated from each other. If you have an app which uses Java7 and there is an app which uses...

How to write to a file in shell script?

Linux uses >> operator to write to a file. For instance: If you want to calculate the size of your log directory and want to write it somewhere, then du -s  /var/log>> filename Isn't this simply awesome, Multiple commands ( date +'%Y %m %d %H : %M'; du -s /var/log) >> LogsDirectorySize.txt; In above sample, we are writing date plus size both. Yes, so simply use semi...

How to find devices on a given network?

To find the devices on the given network, use nmap On RHEL systems,  $ sudo yum install nmap On Unix Systems $ sudo apt-get install nmap $ nmap -sP IPaddress of your network you can find IPaddress of your network by simply running ifconfig command and can find the pattern of IP address of your own netowork So, my network has a pattern of 192.168.133.... $ nmap -sP 192.168.133.0/24 This...

Update Local repository with server

< Back To synchronize all the changes done on the server with your local repository, use git PULL. $ git pull origin BranchName This will update the local files with the remote changes on the github server. There is another way $git reset --hard origin/BranchName How to check the differences between two branches? $ git diff branch_1 branch_2 How to update the server if the...

Github - Branching

< Back  1. To create a new branch $ git checkout -b branch_b1 2. To swtich back to master $ git checkout master 3. To create a new branch from any other branch (other than master) $ git checkout -b branch_b2 branch_b1 4. To list the available branches in your current repository $ git branch -a 5. To delete the branch $ git branch -d BranchName 6....

Github

Git is really in use nowadays, and most of the companies are using it for smooth development and proper file synchronizations. So, here is a small tutorial on using GITHUB from command line. Create a account on github. And set your username and email on the terminal using the following git commands git config --global user.name "your_name" git config --global user.email "your_name@mail_domain.com" 1....

NVM - Node Version Manager

NVM stands for Node Version Manager. It is really an awesome way to handle different versions of node and manipulate with them to work on different requirements. So, to install it.  Best Way is to install git  (UBUNTU)  apt-get install git  Then, simply run git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe...

How to create a bootable USB device in Linux?

Thanks to Linux, it has made the creation of a bootable USB, ton of times easier than Windows. So you just have to type the following command. dd bs=4M if=file_name.iso of=/dev/sdb && sync Ok, so the command looks easier, but most of the time people get stuck at of. of means output file. Because, in output file, we cannot use the name of the file, instead we have to use the name, which...

Types of Rebooting

Cold Reboot Also known as a hard reboot. In this, the power to the system is physically turned off and back on again, causing an initial boot of the machine. Warm Reboot Also known as soft reboot. In this the system restarts without the need to interrupt the power. ...

could not resolve error in github cloning...!!!!

Sometimes, we face the "could not resolve error" when we are trying to clone the github repository. So, it happens when we have some kind of proxy set on our system. So, either you can unset them and rerun the "git clone" command. or directly run this command based on the http type you are using to clone. git config --global --unset http.proxy or git config --global --unset https.proxy  ...

What's a proxy server?

In linux, you can check the proxy settings by using the command $ env | grep proxy or you can use the following commands $echo $HTTPS_PROXY $echo $HTTP_PROXY $echo $http_proxy $echo $https_proxy If it doesn't show anything, then the proxy is not set. Otherwise, you can unset them using the following commands. $ unset  https_proxy $ unset http_proxy ...

Text File Busy/Unexpected End of File Error in Bash

Sometimes, we get an error when we paste some bash code from windows environment to linux terminal. The error is like text file busy, or bash uninterrpreted error, Unexpected End of File etc. etc. So, the poblem is, either the file is not writeable.  So, chmod 777 filename or  the linux terminal is not able to read the input file. So, run the dos2unix command $ dos2unix filename.sh And...

How to delete a directory even if it's not empty?

You might have seen, while using the "rmdir" command that you cannot delete this directory as it is not empty. Use the following command : > rm -r directoryName or > rm -rf directory_Name so, "f" represents force. So, it will skip all the necessary checks and simply wipe out the whole directory. Use SUDO, if you still cannot delete. Enjoy Linux...!!!! +CentOS +Linux +Ubunt...

How To in Linux

Check which services are running? What does sourcing a file means in Linux? How to remove the dpkg lock? How to see the name of the linux distribution you are running? How to find the inodes and hard links of a file? How to create symbolic links in Linux? How to do persistent mounting of a partition over a reboot? How to enable line numbering in vi...

How to remove node from your system?

For RHEL systems, Fedora, CentOS > sudo yum remove nodejs For Ubuntu  > sudo apt-get remove nodejs And you are good to go For verification, Type in the terminal > node Simple...!!!! Enjoy Linux, +CentOS +Ubuntu ...

How to remove npm ?

Ok, so npm stands for Node Package Manager, and trust me, it's really an awesome thing.  It is a package manager for various things, like angular, node (default), gulp, grunt, mobile, javascript and many more. But, it is also important to know, how to uninstall npm from the system to get a fresh npm later. So, here it goes $ sudo npm uninstall npm -g $ npm -v To remove everything related...