Asetukset yms
Journal logien rajaus
/etc/systemd/journald.conf
SystemMaxUse=100M
Snäppien rajotus
$ sudo snap set system refresh.retain=2
Pikanäppäin tiedostoon
Shortcutiksi Shirf + Ctrl + M, commandiksi
soffice –writer /path/file.odt
New Dockument saapi, ko ~/Templates hakemistoon laittaa esim. Txt.txt tiedoston
Näyttö pois päältä ja takaisin
Huom. html tulkkaa 2viivaa -> 1 viiva. Laita muokkaus pääle niin tullee oikea.
xrandr –output DisplayPort-1 –off
xrandr –output DisplayPort-1 –auto –rotate left –right-of DisplayPort-0
Pikanäppäimet
Ctrl Alt s (pois)
Ctrl Alt a (päälle)
Pikanäppäin tiedostonhallintaan
Settings – keyboard – layout
https://askubuntu.com/questions/692880/keyboard-shortcut-to-open-ubuntu-file-manager
Kuvankaappaukset
Shutter
Ctrl + Shift + Alt + PrintScreen = Active window
Ctrl + Shift + PrintScreen = Selected area
Ctrl + PrintScreen = The whole screen
Ctrl + V = Paste image
Aliakset
https://askubuntu.com/questions/1414/how-to-create-a-permanent-alias
nano .bashrc
alias=”komento”
alias uu=’sudo apt update && sudo apt upgrade’
alias h=’history’
alias aar=’sudo apt autoremove’
alias aac=’sudo apt autoclean’
Virtanappula
sudo -H gedit /etc/acpi/events/powerbtn
Add #
to comment line:
#action=/etc/acpi/powerbtn.sh
Add a new line:
action=/sbin/poweroff
Save file. Open a console and type:
sudo acpid restart
Ikkuna takaisin televisiosta
siirrä ikkunaa Super Shift Oikea
pikakuvakheet esim virtuaalikone
dconf-editor
Activities valikon muokkaus
sudo apt install menulibre
Swapin käyttö vasta sitte ko rammi loppuu
sudo echo -e ”vm.swappiness=0” | sudo tee -a /etc/sysctl.conf
Hiiri
Alt pohjassa hiirenklikkaus → siirtää ikkunaa … huono diablossa, näin sen saa pois
dconf write /org/gnome/desktop/wm/preferences/mouse-button-modifier ’”<Shift><Control><Alt><Super>”’
Päivämäärä notifieriin
dconf-editor
org.gnome.desktop.interface
gsettings set com.canonical.indicator.datetime show-date true
Kellonaika promptiin
.bashrc
export PROMPT_COMMAND=”echo -n [$(date +%H:%M:%S)] ”
Grubin säätö
GRUB-CUSTOMIZER
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
Boottiviestit näkösälle
nano /etc/default/grub
- From a terminal (or after pressing Alt + F2) run:
gksudo gedit /etc/default/grub
and enter your password.
- Find the line starting with
GRUB_CMDLINE_LINUX_DEFAULT
and remove the parametersquiet
andsplash
. - Save the file and close the editor.
- Finally, start a terminal and run:
sudo update-grub
to update GRUB’s configuration file.
Laitteet
VMWare 3d grafiikat
vim .vmware/preferences
mks.gl.allowBlacklistedDrivers = "TRUE"
https://askubuntu.com/questions/832755/no-3d-support-is-available-from-the-host-on-all-vmware-guests
Näytönohjaimen tutkiminen
sudo update-pciids #optional command, requires internet
lspci -nn | grep VGA
dmesg | egrep ’drm|radeon’
lspci | grep -E ”VGA|3D”
sudo lspci -v -s 01:00.0
sudo apt-get install mesa-utils
LIBGL_DEBUG=verbose glxinfo
LIBGL_DEBUG=verbose glxinfo | grep rasterizer
LIBGL_DEBUG=verbose glxinfo | grep llvmpipe
inxi -Fx
lspci
Bluetooth
sudo nano /etc/bluetooth/main.cfg
[General]
Disable=Headset
https://askubuntu.com/questions/319871/bluetooth-speaker-preferred-mode-high-fidelity-playback-a2dp-is-not-getting
sudo service bluetooth restart
Stressitesti
sudo apt install stress
stress -c 4
Ohjelmistot
VMware Player
3D pääle:
~/.vmware/preferences
mks.gl.allowBlacklistedDrivers = ”TRUE”
Rammi
/etc/vmware/config
prefvmx.minVmMemPct = ”100”
https://possiblelossofprecision.net/?p=2476
Virtualbox
3D virittäminen
https://blogs.oracle.com/scoter/oracle-vm-virtualbox-6-3d-acceleration-for-ubuntu-1804-guest
tecadmin.net/install-virtualbox-on-ubuntu-18-04/
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"
Ei toiminu:
sudo sh -c ’echo ”deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib” >> /etc/apt/sources.list.d/virtualbox.list’
sudo apt update
sudo apt install virtualbox-6.0
Yle-dl
sudo pip uninstall yle-dl
sudo pip3 uninstall yle-dl
sudo apt-get install rtmpdump wget ffmpeg python3-dev python3-setuptools python3-pip python3-pycryptodome python3-requests python3-lxml python3-socks php-cli php-curl php-xml php-bcmath
sudo pip3 install –upgrade –force-reinstall yle-dl
Electrum
sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
sudo pip3 install https://download.electrum.org/3.1.3/Electrum-3.1.3.tar.gz |
https://electrum.org/#download
LibreOffice 6
sudo add-apt-repository ppa:libreoffice/ppa sudo apt update sudo apt install libreoffice
Evolution
sudo chmod -x /usr/lib/evolution/evolution-calendar-factory
sudo chmod -x /usr/lib/evolution/evolution-source-registry
sudo chmod -x /usr/lib/evolution/evolution-addressbook-factory
snap
sudo apt install filezilla
sudo apt install rar unrar
sudo ./genymotion-2.12.1-linux_x64.bin -d /home/ohto/Downloads/Softaa/genymotion -u
Vbindiff
Heksaeditori ja erojen vertailu
sudo apt-get install vbindiff
WINE
https://wiki.winehq.org/Ubuntu
sudo dpkg –add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
Stable branch
sudo apt-get install –install-recommends winehq-stable
Development branch
sudo apt-get install –install-recommends winehq-devel
Staging branch
sudo apt-get install –install-recommends winehq-staging
sudo apt install winetricks
winecfg
Wine poistaminen:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:wine/wine-builds
asennetun jutun pikakuvakkeen poistaminen /.local/share/applications/wine-*
Winen uudelleenkäynnistys
wineboot
Wine ohjelmien poisto
wine uninstaller
poista ~/.wine/ohjelmannimi
Pikakuvakkeiden poistaminen:
It should be enough to remove the wine folder under ~/.local/share/applications.
alacarte poistaa kans
Nano
Alt a Aloita valinta
Alt 6 Kopioi (rivin)
Ctrl K Leikkaa (rivin)
Ctrl U liitä
Imagenteko:
Yumi, MultiSystem, https://etcher.io/
Gnome-sound-recorder
sudo apt install gnome-sound-recorder
Audio switcher
https://askubuntu.com/questions/970323/whats-the-easiest-way-to-switch-audio-output-in-ubuntu-17-10
sudo add-apt-repository ppa:yktooo/ppa
sudo apt-get update
sudo apt-get install indicator-sound-switcher
Diablo II
wine ’/path/.wine/drive_c/progs/Diablo II/Game.exe’ -w -skiptobnet
IRC
XCHAT kanavaa oikealla napilla, sitte settings → disable join part
/set irc_conf_mode 1
#ubuntu
#ubuntu-gnome
xchat:
/set irc_conf_mode on
/gui apply
Pasteta nettiin
sudo apt-get install pastebinit
komento | pastebinit
Diablo 2 Resurrected
https://dreamsandcode.medium.com/how-to-install-diablo-2-resurrection-on-linux-6feb42fb5177
Key – RADV_DEBUG Value – nohiz
Wine runner GE
reso 1200×720 yms
XFREERDP
https://github.com/FreeRDP/Remmina/wiki
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt-get update
sudo apt-get install remmina remmina-plugin-rdp libfreerdp-plugins-standard
sudo apt install freerdp-x11
tai freerdp2-x11
xfreerdp /v:rds.domain /g:rdgw.domain /u:user /d:domain +auto-reconnect /f
ctrl+alt+enter fullscreen pois
sudo apt-get remove freerdp-x11
#!/bin/bash alkusseen tiedostoon ja se runnaavaksi
YLEAREENA-DL
https://aajanki.github.io/yle-dl/
https://github.com/aajanki/yle-dl/tarball/2.10.1
sudo apt-get install rtmpdump python python-crypto
sudo make install
$ yle-dl http://areena.yle.fi/1-3051647
http://forum.ubuntu-fi.org/index.php?topic=20696.280
Irfanview
WINEPREFIX=”$HOME/prefix32″ WINEARCH=win32 wine wineboot
winetricks mfc42
Wireshark
sudo add-apt-repository ppa:wireshark-dev/stable
sudo dpkg-reconfigure wireshark-common
press the right arrow and enter for yes
sudo chmod +x /usr/bin/dumpcap
https://github.com/gcla/termshark
Iftop verkkoliikenne
sudo apt install iftop
Hardiskäyttö monitorit yms
iotop
hardinfo
inxi -Fx
mate-system-monitor
neofetch
ram nopeus
sudo dmidecode –type 17 | grep ”Speed”
Multisystem
download sudo apt install xterm sudo install sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main' wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt key add - sudo apt update sudo apt install multisystem
Office 2013
http://askubuntu.com/questions/879304/wine-2-0-says-it-supports-office-2013-how-do-i-actually-install-it/882084#882084
http://windowsafg.no-ip.org/office2013.html
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
sudo apt install winbind
sudo apt install winetricks
WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 winecfg
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 winecfg
ja sieltä windows 7
WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 winetricks
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 winetricks
ja asenna msxml6 ja cambria font
WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 wine ./setup.exe
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 wine ./setup.exe
To avoid the ”black screen” bug, you need to create the following DWORD entry in the registry: HKCUSoftwareWineDirect3DMaxVersionGL Hex value: 30002
Aktivointi-ongelma, jos käyttää OriginalImagea hiedocilta
Office 2010
Office_2010_ProPlusAc_SP1_Finnish_x32.exe
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 winecfg
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 winetricks
WINEPREFIX=~/.wine/Office2010 WINEARCH=win32 wine ./Office_2010_ProPlusAc_SP1_Finnish_x32.exe
Steam
rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
https://askubuntu.com/questions/771032/steam-not-opening-in-ubuntu-16-04-lts
Screenshot nethiin
shutter
DD-WRT
http://www.desipro.de/ddwrt/K3-AC-Arm/
ZFS
Pooli uuteen kerneliin
https://gitlab.com/snippets/1861014
sudo zpool import hgst -f
https://www.csparks.com/ZFS%20Without%20Tears.html
sudo apt install zfsutils-linux
zpool attach [-f] [-o property=value] pool device new_device
Attaches new_device to an existing zpool device. The existing
device cannot be part of a raidz configuration. If device is not
currently part of a mirrored configuration, device automatically
transforms into a two-way mirror of device and new_device. If
device is part of a two-way mirror, attaching new_device creates a
three-way mirror, and so on. In either case, new_device begins to
resilver immediately.
-f Forces use of new_device, even if its appears to be in use.
Not all devices can be overridden in this manner.
-o property=value
Sets the given pool properties. See the ”Properties” section
for a list of valid properties that can be set. The only prop‐
erty supported at the moment is ”ashift”.
zpool detach pool device
Detaches device from a mirror. The operation is refused if there
are no other valid replicas of the data. If device may be re-added
to the pool later on then consider the ”zpool offline” command
instead.
https://pthree.org/2012/12/11/zfs-administration-part-vi-scrub-and-resilver/
Invalid encoding-file
sudo apt-get install convmv
convmv -r --notest -f cp850 -t UTF-8 *
Muita
Gnome Tweaks
Kdenlive videoeditori
Stacer monitorointi yms
Tietoturva
Varmuuskopiointi
Timeshift
DSM resetointi Control Panel → Update/Restore → Reset
Nas, Control panel, Shared Folder, Encryption, Mount
tai mount.ecryptfs
ssh user@ip
rsync -ah –progress –delete /path/*
user@ip:/path/
rar a -p paketti.rar kansio
Uspilevyle
rsync -r -t -p -v –progress –delete -s /mnt/hgst/Tähelliset/ /media/ohto/Uspisynkki/Tähelliset/
Kansion salaus:
https://help.ubuntu.com/community/FolderEncryption
Gnome Encfs Manager
.nimi ja nimi
sudo add-apt-repository ppa:gencfsm && sudo apt-get update && sudo apt-get -y install gnome-encfs-manager
- Luo kotiin .Salaa. Son stashi.
- Mount directoryksi Suojaa
- Mounttaa
- Kopioi salattavat tiedostot Suojaan
- Klikkaa plussaa
- Luo ja valitte kansio .salaa
- Luo kansio Suojaa
- Anna salis
- Kopioi salattavat tiedostot Suojaa -kansioon
SSH
Serveriin
sudo apt install openssh-server
Clienttiin
sudo apt install sshfs
sshfs ohto@192.168.41.146:/serverikansio ~/clienttikansio
Sekalaiset
Exfat
sudo apt-get install exfat-fuse exfat-utils
Verkon uudelleenkäynnistys
sudo service network-manager restart
Käyttäjien tutkiminen
id
grep 121 /etc/passwd
Tiedoston oikeudet
chmod +x filu
Usb image tikulle
ImaGEN EMULOINTI:
qemu-system-x86_64 -m 1024 lm32.iso
Tikun testaus
sudo apt install qemu-system-x86
sudo qemu-system-x86_64 -hda /dev/sdx
https://makandracards.com/makandra/1192-using-qemu-to-quickly-test-an-iso-or-bootable-usb-drive
Tikusta image:
sudo dd if=/dev/sdb of=usb-image.iso status=progress
tai
ddrescue /dev/sdx /home/user/desktop/multiboot.img
Pakkaus:
dd if=/dev/sdastatus=progress conv=sync,noerror bs=64K | gzip -c > /home/ohto/multipuutti.img.gz
Purku:
gunzip -c /home/ohto/multipuutti.img.gz | dd of=/dev/sdx status=progress conv=sync,noerror bs=64K
Nollaus:
Image tikulle:
sudo dd of=/dev/sdb if=usb-image.iso status=progress
https://www.balena.io/etcher/
woe-usb
rosawriter
Startup disk creator
USB standardin testaus
lsusb näyttää vehkeet
lsusb -D /dev/bus/usb/xxx/xxx
https://askubuntu.com/questions/604158/how-do-i-tell-if-a-usb-thumb-drive-is-usb-3-0
Bootinkorjaus
sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair
USB liikenne wiresharkilla
http://stackoverflow.com/questions/31054437/how-to-install-wireshak-on-linux-and-capture-usb-traffic
ls /sys/kernel/debug/usb/usbmon
sudo apt-get install wireshark libpcap0.8
- Add your username to the ”wireshark” usergroup:
sudo usermod -a -G wireshark <your_username>
Important: Logout of your session, then log back in.
For kernel version 2.6.21 and later, load the loadable module usbmon in the Kernel:
Tämä sitten kun aloittaa uuden session, siis kun systeemit on jo asennettu ja konvvattu. Pitää siis laittaa tuo probe käyntiin:
sudo modprobe usbmon
If the usbmon interfaces don’t appear in Wireshark, look for interfaces using dumpcap (the command-line tool of Wireshark):sudo dumpcap -D
You should see the usbmon* interfaces. Now display the permissions of the usbmon interfaces:ls -l /dev/usbmon*
If the usbmon* files have ’crw——-’, then it’s normal that Wireshark cannot read them because it’s not run as root. Do not execute wireshark in root mode, it may damage files. Instead, make them accessible to other users:Tämä on tärkeä, jos ei tee niin ei kaappaa:sudo chmod 644 /dev/usbmon*
https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file
convert -density 200×200 -quality 20 -compress jpeg input.pdf output.pdf
LibreOffice Draw -> Export -> Quality
Pdf tiedostojen imutus
https://superuser.com/questions/260087/download-all-pdf-links-in-a-web-page
wget --recursive --level=1 --no-directories --no-host-directories --accept pdf http://example.com
Pdf tiedostojen yhdistäminen
pdftk 1.pdf 2.pdf cat output yhdistetty.pdf
Kansion pakkaus multithread
sudo apt install pigz
tar -I pigz -cf tarball.tgz kansion_nimi
Purkaminen:
pigz -dc tarball.tgz | tar xf –
Komentoja
apropos ”hakutermi”
fdisk -l
Kaikki tiedostot alikansioista nykyiseen kansioon
find . -mindepth 2 -type f -print -exec mv {} . \;
Terminaalin nimen muuttaminen
editoi .bashrc, tallenna, tämä toimii sitten komennolla ”set-title otsikko”
https://unix.stackexchange.com/questions/177572/how-to-rename-terminal-tab-title-in-gnome-terminal
function set-title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
Tulostin
Since Ubuntu 16.04 aka Xenial is using systemd
as init, you have to use systemctl
to control/start/stop services.
In your case the lines as follows should do the job.
systemctl stop cups
systemctl stop cups-browsed
systemctl disable cups
systemctl disable cups-browsed
Linux kaatuu
https://unix.stackexchange.com/questions/31818/what-to-do-when-a-linux-desktop-freezes?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
- Oikeanpuoleinen Altgr pohjassa
- Jos ei toimi, /etc/sysctl.d/10-magic-sysrq.conf luku 176 -> 1
Raising Elephants Is So Utterly Boring
- Alt+SysRq+R switch keyboard to ’raw’ mode
- Alt+SysRq+E send SIGTERM (termination) signal to all processes except mother init
- Alt+SysRq+I send SIGKILL signal to all processes, a little more aggressive
- Alt+SysRq+S sync all filesystems to prevent data loss
- Alt+SysRq+U remount filesystems as read-only
- Alt+SysRq+B forcefully reboot
Muistin tutkiminen
https://askubuntu.com/questions/743649/new-16gb-of-ram-installed-yet-i-see-15-3-on-my-system-why
- You can check how big your RAM sticks are claiming to be with:
sudo dmidecode | grep Size | grep MB
- You can check how much RAM is available for general use with (look for
Mem
andtotal
):free -h
- You can estimate how much memory the kernel is using with:
cat /proc/meminfo | grep Slab
- You can check for ”stolen” graphics card memory with:
dmesg | grep stolen
- You can look for specific hardware reserved memory by looking through:
dmesg | grep e820
GPU ajurit Radeon Mesa Vulkan
20 sudo add-apt-repository ppa:lutris-team/lutris
21 sudo apt updtae
22 sudo apt update
23 sudo apt install lutris
24 $ sudo apt install libvulkan1 libvulkan-dev vulkan-utils
25 $ sudo add-apt-repository ppa:oibaf/graphics-drivers
26 sudo apt update
27 sudo apt upgrade
28 sudo apt install mesa-vulkan-drivers
29 sudo dpkg –add-architecture i386
30 sudo apt install libgl1-mesa-dri:i386
31 sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386
32 uu
33 uu
34 aar
35 aac
36 sudo dpkg –add-architecture i386
37 wget -nc https://dl.winehq.org/wine-builds/winehq.key
38 sudo apt-key add winehq.key
39 sudo apt-add-repository ’deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main’
40 sudo apt-get update
41 sudo apt-get install –install-recommends winehq-stable
42 sudo apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386
Screen tearing
sudo mkdir /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/20-amdgpu.conf
Section ”Device”
Identifier ”AMD”
Driver ”amdgpu”
Option ”TearFree” ”true”
EndSection
Alivoltit Vega 64
https://forum.level1techs.com/t/how-to-overclock-vega-on-linux/132771/64