Saturday, September 28, 2024

GIT

 




Linux - console

 


    In Linux CLI it is possible to use build in function in bash and create by myself scripts. Build in funcction are very usefull. but more rewording are scripts especially writed yourselfs.

There are several ways to execute bash scripts.

- Run Bash Script using sh
    
    sh <script name> <arguments>
    
    Example:
    sh helloworld.sh

- Run Bash Script using bash

    bash <script name> <arguments>

    Example:
    bash helloworld.sh

- Run Bash Script using source

    source <path>*/<file name> <arguments>

    Path:
    ./file.sh - run in local directory
    /home/user/Documents/file.sh - run absolute path directory

    

    Example:
    source script.sh         - local path
    . script.sh                   - local path  
    
    /home/kb/script.sh     -absolute path


If necesarry right is needded use:
           chmod +x nazwa_pliku.sh



To be continue....

PS.

sh -  Bourne shell insterpreter
bash -  Bourne Again Shell 


To increase my user exprience in CLI, I choose to install ZSH and Starshipp. 
In the future my goal is to use Vim daily. 



Python - Anaconda

I instaled Anaconda on my Linux (Kubuntu Distro).
I have problem to start Anaconda. Solution was to run extra command before 

To start Anaconda run commands in console. 

First command:

    source ~/anaconda3/bin/activate root

Second/main command:

    anaconda-navigator











Wednesday, September 11, 2024

Linux - chapter 1

 


Linux 



    In this post I will cover basic command used in Linux. 
Background:
I have tested many distribution, like Fedora, Kali, Ubuntu, Mint. Currently I use Kubuntu, because it fullfill my needs. Most efficient way of using Linux    is CLI(command-line interface). For me at this moment easier is to GUI to use Linux. But usage of CLI is much efficient. My goal is to learn Vim till end of Year( at  least at basic level). Mainly used (Maybe most popular) for scripting is used bash programing language. Advantage of Bash scripting programig is Automation, Portability, Flexibilty and Accessibilty. 

Bash programing language belong to shell environment. To check list of avaiable shell in Your laptop, is run command "ps":

When we confirmed, we will used bash.

To check date we can use command date.

:

        


To confirm in which file directory, I am run command pwd.









 







K8s cluster - bash install

     In my homelab, I testes another method of installation of Kubernetes. Average time of installation of Kubernetes via Ansible was 15 min...