Main / Solver
Key Shortcuts, Nifty Tricksctrl + alt + T = open terminal Show only a specific amount of command history with history N for N lines/commands. Copy entire file systems with an advanced command to preserve permissions and links properly, such as rsync -aHAX <src> <dest> Splash screenctrl + alt + F5 = get prompt Colorshttp://unix.stackexchange.com/questions/94498/what-causes-this-green-background-in-ls-output UsersTo allow non-logged-in users to run GUI apps on the desktop, use xhost +username@localhost or xhost +si:localuser:username. PermissionsTo change permissions on all dirs in a tree: To make all new files in a tree have the same group owner as the parent: Disk utilsdu -cs <file or folder> = disk usage (appears to be -k, size in KB, by default) If you are trying to mount and get this error sudo mount -t auto /dev/sda /media/sdcard mount: you must specify the filesystem type You probably need to use /dev/sda1. To rescue yourself from EXT4-fs error (device mmcblk0p2): ext4_mb_generate_buddy:736: group 43, 5655 blocks in bitmap, 5656 in gd use sudo e2fsck -c /dev/sdd2 on the unmounted drive. Use df to get a cleaner print than simply mount. To see more information in a nicer view than fdisk use cfdisk. BashShortcuts: http://www.aboutlinux.info/2005/08/bash-shell-shortcuts.html .bashrc function for setting terminal tab title on command line: # enable title changes to terminal tabs # function to set terminal title function set-title(){ if [[ -z "$ORIG" ]]; then ORIG=$PS1 fi TITLE="\[\e]2;$*\a\]" PS1=${ORIG}${TITLE} } .bashrc function for adding a series of named tabs to your terminal: function term4me(){ gnome-terminal \ --tab-with-profile=git-tabs --working-directory=/home/ts/somedir \ -e 'bash -c "export SET_TITLE=somedirWORK; bash"' \ --tab-with-profile=git-tabs --working-directory=/home/ts/somedir2 \ -e 'bash -c "export SET_TITLE=somedir2WORK; bash"' \ --tab-with-profile=git-tabs --working-directory=/home/ts/somedir3 \ -e 'bash -c "export SET_TITLE=somedir3WORK; bash"' } Process infoUse ps auxww to show process run status PROCESS STATE CODES Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process. D Uninterruptible sleep (usually IO) R Running or runnable (on run queue) S Interruptible sleep (waiting for an event to complete) T Stopped, either by a job control signal or because it is being traced. W paging (not valid since the 2.6.xx kernel) X dead (should never be seen) Z Defunct ("zombie") process, terminated but not reaped by its parent. For BSD formats and when the stat keyword is used, additional characters may be displayed: < high-priority (not nice to other users) N low-priority (nice to other users) L has pages locked into memory (for real-time and custom IO) s is a session leader l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) + is in the foreground process group How to find the PID for a program, knowing only it's name? How to find stack or heap size for a running program? Background a Process0. Run some command When a process goes to the background, it essentially becomes a daemon and it's new parent becomes the init process. A fork and exit. https://stackoverflow.com/questions/35705451/is-changing-parent-process-necessary-when-daemonize-a-process SignalingAnnoying background process that's spitting out constant data to stdout? You can at least pause it with a kill -SIGSTOP <pid> Graphical Kernel Maphttp://www.makelinux.net/kernel_map/ Breaching the infamous libstdc++5 wallUh oh - libstdc++.so.5: cannot open shared object file: No such file or directory .../jre/bin/java: No such file or directoryThis problem relates to not having some 32-bit libraries installed on your 64-bit system. To solve, do an apt-get install for the libs: libc6-i386 lib32gcc1 lib32z1 lib32stdc++6 ia32-libs SSH Locale ComplaintsWe can also disable SSH locale environment variable forwarding to fix this error. Open the SSH client configuration file on your local computer. sudo nano /etc/ssh/ssh_config Find this line: SendEnv LANG LC_* Add a # sign at the beginning to comment it out. Save and close the file. Big MistakesDo not uninstall python pmwiki Main repositoryhttps://www.mail-archive.com/pmwiki-users@pmichaud.com/msg09315.html Ubuntu issuesIf your sudo password is demanded on every command, it may be that your system time is messed up. Dell Laptop TouchpadIt's quite simple to change the speed. Open up /usr/share/X11/xorg.conf.d/40-libinput.conf and make the needed edits to the touchpad entry. Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "DisableWhileTyping" "True" Option "AccelProfile" "adaptive" Option "AccelSpeed" "0.6" Driver "libinput" EndSection Dell Laptop TouchscreenThere's a lot of nonsense out there about how to disable it, but it's actually VERY simple for Ubuntu 20. Get the name of the touch device with xinput --list. Then add a line to your /home/<user>/.profile file that says xinput disable '<devname>'. Dell Tower Fan ControlUse i8kctl utility. You can set the fan speed manually with i8kctl fan 1 1. tyler@Tyler-XPS-8930:~$ cat /sys/class/hwmon/hwmon2/device/hwmon/hwmon2/fan1_label Processor Fan tyler@Tyler-XPS-8930:~$ cat /sys/class/hwmon/hwmon2/device/hwmon/hwmon2/fan2_label Motherboard Fan When you change the fan speed, this alters the PWM values in the driver among 0/128/255: tyler@Tyler-XPS-8930:~$ cat /sys/class/hwmon/hwmon2/subsystem/hwmon2/pwm1 128 tyler@Tyler-XPS-8930:~$ cat /sys/class/hwmon/hwmon2/subsystem/hwmon2/pwm2 128 https://www.google.com/search?channel=fs&client=ubuntu&q=explain+dell_smm_hwmon+ubuntu Dell laptop lid close actionsThe settings are contained in /etc/systemd/logind.conf and /etc/UPower/UPower.conf Login screen display managerTo stop the system from suspending itself while awaiting login, use: sudo su su lightdm -s /bin/bash dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 exit exit notify-osdTo get rid of those annoying network pop ups, get to system monitor with gnome-system-monitor and find notify-osd and stop it. Stop it now!! Using apt-getIf you keep running into a 404 Not Found error when trying to install new packages, someone probably deleted the files off of the archive URL that /etc/apt/sources.list points to. Try replacing each archive with old-releases in the URLs. Behind a proxy server, you may get a 401 Unauthorized error with apt. Create a file /etc/apt/apt.conf and add the lines: Acquire::http::proxy "http://user:pass@server.site.com:8080/"; Acquire::https::proxy "https://user:pass@server.site.com:443/"; Acquire::socks::proxy "socks://user:pass@server.site.com:1080/"; If you are messing around with Unity and end up with a black background and no changes to wallpapers are taking, try the command gsettings set org.gnome.settings-daemon.plugins.background active true. Infamous Linux static IP loss problemhttps://askubuntu.com/questions/459140/why-dhclient-is-still-running-when-i-choose-static-ip Running a 32-bit app on a 64-bit systemThe error often looks something like " No such file or directory". Had success with sudo apt-get install gcc-multilib. When you go to install all the missing 32-bit arch libraries that you'll need, make sure you have i386 as a supported arch in the /etc/apt/sources.list. See more: https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit Audio device controlsudo add-apt-repository ppa:yktooo/ppa sudo apt-get update sudo apt-get install indicator-sound-switcher Installs to /usr/bin/indicator-sound-switcher Window switchingProblem is usually Unity's stupid grouping. Need to deactivate those and use the Compiz static switcher instead via https://askubuntu.com/questions/68151/unity-how-do-i-revert-alt-tab-behavior-to-switch-between-windows-on-the-current Installing libssl-devIt may not cleanly install, with something like this: sudo apt install libssl-dev The following packages have unmet dependencies: libssl-dev : Depends: libssl1.1 (= 1.1.1f-1ubuntu2) but 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 is to be installed I tried all the suggestions like sudo aptitude install libssl-dev and couldn't get anything to work. Ultimately what I had to do was download the .deb files needed from http://security.ubuntu.com/ubuntu/pool/main/o/openssl/ getting one for libssl and one for libssl-dev. Make sure the versions and platform match. Installing these manually with dpkg worked. This confirms installation: sudo apt-cache policy libssl-dev libssl-dev: Installed: 1.1.1f-1ubuntu2.23 Candidate: 1.1.1f-1ubuntu2.23 Version table: *** 1.1.1f-1ubuntu2.23 100 100 /var/lib/dpkg/status 1.1.1f-1ubuntu2.22 500 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 1.1.1f-1ubuntu2.20 500 500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 1.1.1f-1ubuntu2 500 500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages 1.1.0g-2ubuntu4 500 500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 500 http://cz.archive.ubuntu.com/ubuntu bionic/main amd64 Packages Note that a change in function naming between OpenSSL 1.0 and 1.1 can cause problems, see here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245419 ls column legendfile type, permissions, number of hard links, owner name, group name, size in bytes (or device major/minor numbers), timestamp If you see a file mode octal representation (type-id-perm), here is the decoding of the type portion: S_IFMT 0170000 bit mask for the file type bit field S_IFSOCK 0140000 socket S_IFLNK 0120000 symbolic link S_IFREG 0100000 regular file S_IFBLK 0060000 block device S_IFDIR 0040000 directory S_IFCHR 0020000 character device S_IFIFO 0010000 FIFO Do a selective recursive rmfind . -name <name> -exec rm {} \; Booting desktop from a USB stickHad all kinds of trouble getting this to work with different disk creation tools. Finally hit on the right combo and using a Windows machine: Rufus tool (yes on disk check, no on quick format), pre-format the drive to FAT16 using diskpart, I reverted to an older Xubuntu release (14.04). Set up hibernate ability on Ubuntuhttps://blog.ivansmirnov.name/how-to-set-up-hibernate-on-ubuntu-20-04/ Basically need to expand size of swap space so that all of RAM can be saved to disk, install a couple tools and changes to the GRUB startup, and use the command sudo systemctl hibernate. Linux NewsStarting with Ubuntu 15, huge ethernet port naming convention changes. https://askubuntu.com/questions/689070/network-interface-name-changes-after-update-to-15-10-udev-changes Mounting a network driveAdd this line to /etc/fstab //<ipaddr>/<foldername> /mnt/<mountfoldername> auto nosuid,nodev,nofail,username=<user>,password=<pw> #for example, note the space in the server folder name and how it's escaped //10.2.10.44/Company\040Share /mnt/CoShare auto nosuid,nodev,nofail,username=juice,password=juicepw |