Linux

so Linux-Zeugs, das ich immer wieder vergesse…

Linux

reset the screens (Trick Robert):

ctrl-alt-F7 ... ctrl-alt-F1 

rpm on ubuntu:

alien -i bla.rpm

distribution:

cat /etc/*release*

Kleinzeugs Netzwerk:

nmap -p 5000 172.30.1.1
[luna:~] rschumm% sudo nmap -PR 192.168.1.0/24 -sn

garbage collect docker:

docker images 
sudo docker system prune -a

alternatives

update-alternatives --list java
sudo update-alternatives --config java
update-alternatives --install ... 

update-alternatives --query mvn
to install:  --install <Link> <Name> <Pfad> <Priorität>
sudo update-alternatives --install /usr/bin/mvn mvn /home/rschumm/Software/apache-maven-3.6.0-bin/apache-maven-3.6.0/bin/mvn 100

quick and dirty manual install of JDK 11 on Ubuntu 18.04

update-java-alternatives -l | -s 
% sudo sh -c 'for bin in /usr/lib/jvm/jdk-11.0.2+9/bin/*; do update-alternatives --install /usr/bin/$(basename $bin) $(basename $bin) $bin 100; done'

% sudo sh -c 'for bin in /usr/lib/jvm/jdk-11.0.2+9/bin/*; do update-alternatives --set $(basename $bin) $bin; done'

then choose the installation with update-alternatives --config java

tcsh

set path = ($path $HOME/.gem/ruby/2.3.0/bin/ .)
setenv  M2_HOME /Applications/maven/apache-maven-3.x.x
alias mvn $M2_HOME/bin/mvn

bash

export PATH="/home/rschumm/minis/minishift-1.18.0-linux-amd64/:$PATH"
alias schummsync='rsync -vrtz _site/* xxx@xxx.xxx.hostpoint.ch:~/www/public_html/schumm/'
echo $PATH

to set JAVA_HOME: find out where Java is with: update-alternatives --config java, then, in .bashrc:

export JAVA_HOME="/usr/lib/jvm/jdk-11.0.2+9"

note: do that dynamically?

#!/bin/bash

java Generator.java
#(needs JDK 11)

for file in $(find . -iname '*.yml'); do 
     echo "$file"
     #ls -l "$file"
     oc create -f "$file"
done

Partition resize in RHEL

Partition sda2 füllt nicht die ganze Disk, ich will sie auf das Maximumm vergrössern:

sudo su - 
fdisk /dev/sda

p

d

n

p

..dann auch alles default... 

w

reboot

xfs_growfs /dev/sda2

zurück zum Seitenanfang