Category Archives: Operating System

UNIX – Directory Structure and Explanations

  1. / – Root:-  Every single file and directory starts from the root directory.  Only root user has write privilege under this directory.  Please note that /root is root user’s home directory, which is not same as /. 2. /bin – User Binaries:- Contains binary executables. Common Linux commands you need to use in single-user modes are located under

Read more

MySQL – Enterprise – Installation – Linux

Phase #1 –  PreRequisites MAKE SURE A MOUNT POINT /MySql IS CREATED BEFORE RUNNING THIS SCRIPT………………………… Creating the symbolic soft link for parallel database updations ln -s /data /MySql/mysqldb ln -s /data /MySql/mysql_db Soft Links Created. User and Group Adding. groupadd -g27 mysql echo ‘System Group mysql created with GID 27.’ useradd -m -d /var/lib/mysql -g mysql -G mysql -p

Read more

Safest and the least vulnerable way to add a user to the sudoers with full rights

visudo demouser ALL=(ALL) PASSWD:ALL, !/bin/su root, !/bin/su -, !/bin/sudo su -, !/bin/su – root, !/bin/sudo su root, !/bin/su, !/usr/bin/passwd, !/usr/bin/passwd root, !/bin/vi /etc/sudoers, !/usr/bin/sudo vi /etc/sudoers, !/usr/sbin/visudo, !/usr/sbin/sudo visudo, !/bin/chmod 777 /etc/sudoers, !/bin/chmod ugo+rwx /etc/sudoers :wq!  

Read more

Monitoring Commands in Linux – Intermediate Level

1: top – Process Activity Command The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds. Commonly Used Hot Keys The top command provides several useful hot keys: Hot Key Usage t Displays summary information

Read more

Process Affinity – Linux

Contents 1. Introduction 2. Types of Thread Scheduling 2.1. Compact Scheduling 2.2. Round-Robin Scheduling 2.3. Stupid Scheduling 3. Defining Affinity 3.1. The Linux-Portable Way (taskset) 3.2. The Other Linux-Portable Way (numactl) 3.3. Using OpenMP Runtime Extensions 3.4. getfreesocket 1. Introduction Although a compute node or workstation may appear to have 16 cores and 64 GB of DRAM, these resources are

Read more

Concepts Of Linux Programming – Files and Filesystem

The file is the most basic and fundamental abstraction in Linux. Linux follows the everything-is-a-file philosophy (although not as strictly as some other systems, such as Plan 9).Consequently, much interaction occurs via reading of and writing to files, even when the object in question is not what you would consider a normal file. In order to be accessed, a file

Read more

Simple utility to allocate memory on a Linux Machine

1. What can I use this for? Test swap Test behaviors on a machine when there is little memory available ————————————————————————- 2. Usage ———————————————————— Installation cd /tmp vim memtest.c <enter the contents in the file and save it> vim Makefile <enter the contents in the file and save it> sudo make install ————————————————————————– Makefile all: memtest.c $(CC) memtest.c -o memtest

Read more

Linux Concepts – File/Directory Permissions

Although there are already a lot of good security features built into Linux-based systems, one very important potential vulnerability can exist when local access is granted – – that is file permission based issues resulting from a user not assigning the correct permissions to files and directories. So based upon the need for proper permissions, I will go over the

Read more
Recent Entries »