Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, March 14, 2026

jq command in Linux

 How to access the {"field-name":"cskmetro"}


echo "{\"field-name\":\"cskmetro\"}" |jq -r '."field-name"'


will give the field value

cskmetro

Tuesday, July 23, 2024

Linux Kernel Compilation

 Step 1: Install Required Packages

Install additional packages before building a kernel. To do so, run this command:

sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison


Step 2:

Download the Kernel source code from kernel.org, Extract the tar file

Install linux-headers for the base kernel version use following command to know the base kernel version 'uname -a'


Step3 :


Goto the Extracted directory/folder

run following command

make menuconfig


then save the configurationg and click exit


Step 4 :


Run the following command for compiling kernel

make

Step 5 :

Install kernel modules and kernel

make modules_install
make install

 

Step 6:

 

If amd based CPU in the machine

  sudo apt-get install firmware-amd-graphics

Tuesday, December 27, 2022

Jupyter installation

 

Step 1:

upgrade the pip3

apt-get install python3-pip

sudo pip3 install --upgrade pip 
 
Step 2:
 
Create virtual environment
 
sudo pip3 install virtualenv
 
pip3 install virtualenv
 
mkdir demo
cd demo
virtualenv mynotebookenv
source mynotebookenv/bin/activate 
 
Step 3:
install the jupyter 
pip install jupyter
jupyter notebook

Sunday, November 20, 2022

JAVA Path and JAVA_HOME Path Setting in Linux

 


  1. Open the Terminal

  2. Prepend sudo if logged in as not-privileged user, ie. sudo nano

  3. nano /etc/profile

  4. Press 'i' to get in insert mode
  5. add following :

    export JAVA_HOME="path that you found"
    
    export PATH=$JAVA_HOME/bin:$PATH
    
  6. logout and login again, reboot, or use source /etc/profile to apply changes immediately in your current shell

Monday, October 17, 2022

Running Simple Web Server on Python 2 and Python 3

 



Running Simple Web Server on Python 2


python -m SimpleHTTPServer 8000



Running Simple Web Server on Python 3


python -m http.server 8000

Monday, July 4, 2022

Log rotate error :error: skipping "log file name or path of the file" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

 Error Description:

error: skipping "<log file name>" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.


Answer

su <user> <group>

Thursday, April 15, 2021

Root Terminal Enabling in Linux

 

1.Open the /etc/passwd file

 change the following line 


root:x:0:0:root:/root:/usr/sbin/nologin

to

root:x:0:0:root:/root:/bin/bash



2.Issue the following command in terminal


chmodg+rx /usr/bin/gnome-terminal


Thursday, December 12, 2019

How to run the simple http server


1.open the terminal in linux
2.go to the current folder you want share and issue following on terminal

python -m SimpleHTTPServer

How to interact with the non-interactable Web Elements in Selenium

How to interact with the non-interact able Web Elements in Selenium    // Find the non-interactable element element WebElement element = dr...