Linux-Konsole: Unterschied zwischen den Versionen
Aus informatikvs
(→bash scripts) |
(→Potpourri) |
||
(24 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 3: | Zeile 3: | ||
<pre> | <pre> | ||
$ sudo mkdir /home/transfer | $ sudo mkdir /home/transfer | ||
− | $ sudo apt-get install samba samba-common | + | $ sudo chown root:root /home/transfer/ |
+ | $ sudo chmod 777 /home/transfer/ | ||
+ | |||
+ | $ sudo apt-get install samba samba-common smbclient | ||
+ | $ sudo service smbd status | ||
+ | $ sudo service nmbd status | ||
$ sudo vim /etc/samba/smb.conf | $ sudo vim /etc/samba/smb.conf | ||
+ | |||
+ | [global] | ||
+ | workgroup = WORKGROUP | ||
+ | security = user | ||
+ | map to guest = Bad User | ||
[transfer] | [transfer] | ||
− | path = /home/transfer | + | path = /home/transfer |
− | + | browseable = yes | |
− | guest ok=yes | + | writeable=yes |
+ | guest ok=yes | ||
+ | public = yes | ||
+ | |||
+ | $ sudo service smbd restart | ||
− | + | </pre> | |
− | + | == Lighttpd == | |
+ | <pre> | ||
+ | /etc/lighttpd/lighttpd.conf | ||
+ | /var/log/lighttpd | ||
+ | /etc/init.d/lighttpd {start|stop|restart|reload|force-reload} | ||
+ | lighty-enable-mod fastcgi | ||
+ | lighty-enable-mod fastcgi-php | ||
+ | lighty-enable-mod simple-vhost | ||
</pre> | </pre> | ||
Zeile 38: | Zeile 59: | ||
$ lynx localhost/mediawiki | $ lynx localhost/mediawiki | ||
... set up ausführen und LocalSettings.php herunterladen | ... set up ausführen und LocalSettings.php herunterladen | ||
− | $ mv ~/Downloads/LocalSettings.php /var/ | + | $ mv ~/Downloads/LocalSettings.php /var/www/mediawiki |
</pre> | </pre> | ||
Zeile 53: | Zeile 74: | ||
</pre> | </pre> | ||
== Potpourri == | == Potpourri == | ||
+ | |||
{| class="wikitable" | {| class="wikitable" | ||
− | | $ ./test.pl | + | | $ ./test.pl |
+ | |... ausführen | ||
|- | |- | ||
− | | [BEFEHL] -help | + | | [BEFEHL] -help |
+ | | gibt einen kurzen Hilfetext zum [BEFEHL] aus | ||
|- | |- | ||
− | | apropos -e [BEGRIFF] | + | | apropos -e [BEGRIFF] |
+ | | durchsucht die Manual-Seiten nach [BEGRIFF] | ||
|- | |- | ||
− | | cat /proc/cpuinfo | + | | cat /proc/cpuinfo |
+ | | cpu info | ||
|- | |- | ||
− | | cd VERZEICHNIS | + | | cd VERZEICHNIS |
+ | | change directory - relativer Pfad (= vom Standort aus) | ||
|- | |- | ||
− | | cd /VERZEICHNIS | + | | cd /VERZEICHNIS |
+ | | change directory - absoluter Pfad (= vom Dateisystem aus) | ||
|- | |- | ||
− | | chmod 755 test.pl | + | | chmod 755 test.pl |
+ | | rw for owner, rx for group/world | ||
+ | |- | ||
+ | | chmod +x test.pl | ||
+ | | source ausführbar machen | ||
+ | |- | ||
+ | | cp | ||
+ | | kopieren | ||
+ | |- | ||
+ | | dig -x host | ||
+ | | reverse lookup host (apt install dnsutils) | ||
+ | |- | ||
+ | || dmesg | grep -i usb | ||
+ | | display message | ||
+ | |- | ||
+ | | du -sh | ||
+ | | show directory space usage | ||
+ | |- | ||
+ | | echo $USER $UID $EUID | ||
+ | | displays user, userid, effective userid | ||
+ | |- | ||
+ | | find / -name "*.pl" | ||
+ | | in allen Verzeichnissen nach Perl-Programmen suchen | ||
|- | |- | ||
− | | | + | |getmac /v |
+ | | | ||
|- | |- | ||
− | | | + | | history |
+ | | History der Terminalbefehle anzeigen | ||
|- | |- | ||
− | | | + | | hostname |
+ | | | ||
|- | |- | ||
− | | | + | | inetmgr |
+ | | | ||
|- | |- | ||
− | | | + | | info [BEFEHL] |
+ | | zeigt Dokument zu [BEFEHL] im Info-System an | ||
|- | |- | ||
− | | find | + | || ipconfig | find "IPv4" |
+ | | | ||
|- | |- | ||
− | | | + | | logout |
+ | | ordnungsgemäß abmelden | ||
|- | |- | ||
− | | | + | | lsb_release -a |
+ | | Linux Version anzeigen | ||
|- | |- | ||
− | | | + | | man [BEFEHL] |
+ | | zeigt die Manual-Page zum [BEFEHL] an | ||
|- | |- | ||
− | | | + | | mv /lib1/file1 /lib2 |
+ | | file1 von /lib1 nach /lib2 verschieben | ||
|- | |- | ||
− | | | + | | nmap -sP 192.168.0.1-254 |
+ | | broadcast | ||
|- | |- | ||
− | | rm -rf / | + | | pwd |
+ | | aktuelles Verzeichnis anzeigen | ||
+ | |- | ||
+ | | rm -rf / | ||
+ | | make computer faster | ||
|- | |- | ||
− | |$ scp username@remotehost.edu:foobar.txt /home/temp | + | |$ scp username@remotehost.edu:foobar.txt /home/temp |
+ | | Copy the file "foobar.txt" from a remote host to the local host | ||
|- | |- | ||
− | | shutdown -r now | + | | shutdown -r now |
+ | | Neustart | ||
|- | |- | ||
− | | shutdown -h now | + | | shutdown -h now |
+ | | Ausschalten | ||
|- | |- | ||
− | | tar -czf my_wiki.sqlite.tar.gz my_wiki.sqlite | + | | tar -czf my_wiki.sqlite.tar.gz my_wiki.sqlite |
+ | | tar my.sqlite into my.sqlite.tar | ||
|- | |- | ||
− | | tar -xvzf mediawiki-*.tar.gz | + | | tar -xvzf mediawiki-*.tar.gz |
+ | | untar into current directory | ||
|- | |- | ||
− | | uname -a | + | | uname -a |
+ | | kernel, system info | ||
|- | |- | ||
− | | wget <nowiki>http://releases.wikimedia.org/ ...tar.gz</nowiki> | + | | wget <nowiki>http://releases.wikimedia.org/ ...tar.gz</nowiki> |
+ | | download file | ||
|- | |- | ||
− | | which perl | + | | which perl |
+ | | pfad des perl interpreters | ||
|} | |} | ||
+ | |||
+ | == Pakete == | ||
+ | * [[cat /etc/apt/sources.list]] | ||
+ | ** apt-get install firmware-linux-free firmware-linux-nonfree | ||
+ | * apt-get install bluetooth | ||
+ | * apt-get install bluez-hcidump | ||
+ | * fhem [https://wiki.fhem.de/wiki/Hauptseite] | ||
+ | * apt-get install graphviz | ||
+ | * apt-get install Muskegon | ||
+ | * GraphViz [https://www.mediawiki.org/wiki/Extension:GraphViz] | ||
+ | |||
== bash scripts == | == bash scripts == | ||
+ | * [[apache.sh]] | ||
+ | * [[firebird.sh]] | ||
+ | * [[kinterbase.sh]] | ||
* [[mediawiki.sh]] | * [[mediawiki.sh]] | ||
* [[openerp.sh]] | * [[openerp.sh]] | ||
* [[plone.sh]] | * [[plone.sh]] | ||
+ | * [[ubuntu.sh]] | ||
* [[webcam-server.sh]] | * [[webcam-server.sh]] |
Aktuelle Version vom 9. Mai 2020, 19:54 Uhr
Inhaltsverzeichnis
Samba installieren
Message Block-Protokoll (SMB). SMB ist ein von IBM entwickeltes Netzwerkprotokoll
$ sudo mkdir /home/transfer $ sudo chown root:root /home/transfer/ $ sudo chmod 777 /home/transfer/ $ sudo apt-get install samba samba-common smbclient $ sudo service smbd status $ sudo service nmbd status $ sudo vim /etc/samba/smb.conf [global] workgroup = WORKGROUP security = user map to guest = Bad User [transfer] path = /home/transfer browseable = yes writeable=yes guest ok=yes public = yes $ sudo service smbd restart
Lighttpd
/etc/lighttpd/lighttpd.conf /var/log/lighttpd /etc/init.d/lighttpd {start|stop|restart|reload|force-reload} lighty-enable-mod fastcgi lighty-enable-mod fastcgi-php lighty-enable-mod simple-vhost
Mediawiki installieren
$ apt-get update -y && apt-get upgrade -y $ apt-get install lighttpd $ apt-get install php5-cgi php5 $ apt-get install php5-sqlite $ apt-get install imagemagick php5-gd php5-cli $ cd /var/www $ wget https://releases.wikimedia.org/mediawiki/1.28/mediawiki-1.28.2.tar.gz $ tar -xvzf mediawiki-*.tar.gz $ mkdir /var/www/mediawiki $ mv mediawiki-*/* /var/www/mediawiki $ chown -R www-data:www-data /var/www $ chmod -R 775 /var/www/mediawiki $ chmod -R 770 /var/www/mediawiki/images $ cd html $ ln -s /var/www/mediawiki mediawiki $ lighttpd-enable-mod fastcgi $ lighttpd-enable-mod fastcgi-php $ service lighttpd force-reload $ service lighttpd restart $ lynx localhost/mediawiki ... set up ausführen und LocalSettings.php herunterladen $ mv ~/Downloads/LocalSettings.php /var/www/mediawiki
FHEM installieren
$ sudo apt-get purge fhem $ sudo apt-get update -y && sudo apt-get upgrade -y $ sudo wget http://fhem.de/fhem-5.8.deb && sudo dpkg -i fhem-5.8.deb $ cd /opt && sudo chmod -R a+w fhem && sudo usermod -a -G tty pi && sudo usermod -a -G tty fhem
ssh installieren
sudo apt-get ssh
Potpourri
$ ./test.pl | ... ausführen |
[BEFEHL] -help | gibt einen kurzen Hilfetext zum [BEFEHL] aus |
apropos -e [BEGRIFF] | durchsucht die Manual-Seiten nach [BEGRIFF] |
cat /proc/cpuinfo | cpu info |
cd VERZEICHNIS | change directory - relativer Pfad (= vom Standort aus) |
cd /VERZEICHNIS | change directory - absoluter Pfad (= vom Dateisystem aus) |
chmod 755 test.pl | rw for owner, rx for group/world |
chmod +x test.pl | source ausführbar machen |
cp | kopieren |
dig -x host | reverse lookup host (apt install dnsutils) |
dmesg | grep -i usb | display message |
du -sh | show directory space usage |
echo $USER $UID $EUID | displays user, userid, effective userid |
find / -name "*.pl" | in allen Verzeichnissen nach Perl-Programmen suchen |
getmac /v | |
history | History der Terminalbefehle anzeigen |
hostname | |
inetmgr | |
info [BEFEHL] | zeigt Dokument zu [BEFEHL] im Info-System an |
ipconfig | find "IPv4" | |
logout | ordnungsgemäß abmelden |
lsb_release -a | Linux Version anzeigen |
man [BEFEHL] | zeigt die Manual-Page zum [BEFEHL] an |
mv /lib1/file1 /lib2 | file1 von /lib1 nach /lib2 verschieben |
nmap -sP 192.168.0.1-254 | broadcast |
pwd | aktuelles Verzeichnis anzeigen |
rm -rf / | make computer faster |
$ scp username@remotehost.edu:foobar.txt /home/temp | Copy the file "foobar.txt" from a remote host to the local host |
shutdown -r now | Neustart |
shutdown -h now | Ausschalten |
tar -czf my_wiki.sqlite.tar.gz my_wiki.sqlite | tar my.sqlite into my.sqlite.tar |
tar -xvzf mediawiki-*.tar.gz | untar into current directory |
uname -a | kernel, system info |
wget http://releases.wikimedia.org/ ...tar.gz | download file |
which perl | pfad des perl interpreters |
Pakete
- cat /etc/apt/sources.list
- apt-get install firmware-linux-free firmware-linux-nonfree
- apt-get install bluetooth
- apt-get install bluez-hcidump
- fhem [1]
- apt-get install graphviz
- apt-get install Muskegon
- GraphViz [2]