Linux

Play Linux System Distributions Online in a Web Browser

2022-02-16. Category & Tags: System, Linux, Distributions, Online, Web

Note: many with 5 minute inactive limit and 30 minutes per session limit. CodeAnyWhere container (tested 2022.02, w/ root-sudo & git): py, c/c++, java, php, js, ruby, h5, wordpress, .net, rust, go, node.js. (can skip all payment part). terminal speed good. limitted free trial time. WebMinal (tested 2022.02, NO root/git) (CN network issue for home page, but ok after): Federo CentOS7 (py2.7), right-sided lessons/tutorials (great for new users): shell, MySQL, Python etc. ...

Find and Kill a Process

2021-10-09. Category & Tags: Windows, Linux, Commands, Networking, Ports

see also: 鸟哥 Linux 私房菜 Basic Linux. Linux # find bound PID by port: fuser 8080/tcp kill by port: fuser -k 8080/tcp list by port: lsof -i:8080 using netstat: netstat -nlpte |grep :8080 or: ss -nlpt 'sport = :8080' ref 1 & ref 2 Windows # CMD find PID by port & kill by PID: :: find pid first: netstat -ano | findstr :8080 :: then the pid's task/process tasklist | findstr "<the_PID>" taskkill /PID <the_PID> /F PS find for TCP & UDP: ...

Python GUI Frontend Options Comparison

2021-01-14. Category & Tags: Python, GUI, Desktop, Windows, Linux, Cross-Platfrom

Mainly for the (cross-platform) Python GUI frontend options. CEF (Chromium Embedded Framework). Pro: can use the same way of MVC thinking (modern html5); build-in chromium browser. Con: someone said it may need a little c++. PyQt (v5). Pro: big community, good doc (for c++). Con: c++ way of thinking, just the language is py (the official GUI tutorial lacks GUI screenshots!); pay for commercial usage; still often needs c++. Tkinter. Pro: build-in w/ py, big community. ...

GRUB Rescue

2019-01-06. Category & Tags: GRUB, Rescue, Boot, Linux, Ubuntu

When being forced into GRUB rescue mode, run ls and ls <one_partition> to check available partitions and find the one that we should boot from [ref]. Then set prefix & root [ref]: set root=(hdX,Y) set prefix=(hdX,Y)/boot/grub insmod normal normal To avoid doing this every time, it is recommened to use a live-USB/ISO to repair GRUB (usually only Desktop version can be in live-USB and easy to setup WIFI). (// it should be also ok to do this without USB if there is a nix system working on current HDD). ...

Install & Use R & RStudio

2017-05-08. Category & Tags: R, Install, Ubuntu, Linux, Rstudio

R IN WINDOWS # Download here and install. R IN UBUNTU 18.04 # sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/' && \ sudo apt update && \ sudo apt install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev build-essential && \ sudo -i R # install packages as root, so all users can use. Commonly used packages: install.packages(c('devtools', 'digest', 'repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'ggplot2', 'IRkernel', 'ggpubr')) DigitalOcean ...

Linux init after installation

2016-12-19. Category & Tags: Linux, Must-Have

PROBLEMS # sudo takes a long time (when network having issues) # Reason: distros should have added new host name to /etc/hosts, if the name is changed/added during installation ref. echo -n '127.0.0.1 ' >> /etc/hosts && cat /proc/sys/kernel/hostname >> /etc/hosts or: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 <ADD_YOUR_HOST_NAME> ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 <ADD_YOURS_HERE> annoying “software updater” # sudo sed -i 's/1/0/' /etc/apt/apt.conf.d/20auto-upgrades ; cat /etc/apt/apt.conf.d/20auto-upgrades sudo apt-get remove --auto-remove gnome-software empty/black screen # If screen blacked out after 1st reboot, the problem is gfxmode $linux_gfx_mode in grub. ...

Force Ubuntu desktop Boot into Text Console Mode

2016-12-15. Category & Tags: Linux, Ubuntu, Console, X

Tested in ubuntu deskop 16. short url: s_force-text SOLUTION # sudo cp /etc/default/grub /etc/default/grub.bak && \ sudo sed -ie 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="text"/g' /etc/default/grub && \ sudo sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="text"/g' /etc/default/grub && \ sudo sed -ie 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub && \ sudo update-grub && \ sudo systemctl enable multi-user.target --force && \ sudo systemctl set-default multi-user.target && \ sudo reboot OBS: sometimes, by changing “multi-user.target” is enough, but sometimes we have to update grub. Have not dug into the reason. ...

Completely Automatic Unattended Install of Ubuntu

2016-12-14. Category & Tags: Linux, Automatic, Ubuntu, Installation

OBS 1: this works only for ubuntu server edition, not desktop version. tested in ubuntu 16 x64. OBS 2: remember to change some parts to real values, near: # modify to real value !!! OBS 3: my version need some files in .iso file: “10_linux” & “sources.list”. Warn: the default ks.cfg partition settings will erase the entire disk, and use LVM. See also: Boot Partitions, Install Multi-OS easy2boot PREPARE, AS ROOT # sudo -s ...

Setup Remote Access (VNC) of Linux Servers

2016-12-02. Category & Tags: VNC, Server, Linux, XServer

Tested in Ubuntu 16.04 desktop Gnome+Unity in Vmware. OBS: pure server will automatically start X in reboot and will lack of something, e.g. Default Terminal etc. FIREWALL # TCP port 5900+N (N is monitorId, starts from 1.) TIGHT.VNC AS SERVER # TightVnc allows us to start from a server without X11 and do everything in command line, remotely. install (either already with or w/o desktop) # sudo su: use root can avoid weird problems, see “ps”. ...

Nix Linux Distribution Comparison, Timeline and Relationship

2016-07-13. Category & Tags: Nix, Linux, Distro, Distributions

Main branches directly from linux kernels: Debian, (K)Ubuntu/Deepin … RedHat, CentOS, Fedora … Slackware, Suse, OpenSuse (Leap vs. Tumbleweed) … Arch, Manjaro … Android … RHEL = Red Hat (Inc.) Enterprise Linux SLE = SUSE Linux Enterprise openSUSE Leap <–> CentOS(Rocky Linux) openSUSE Tumbleweed <–> Fedora Sizes Just After Installation (Disk & RAM) # OS Installation DISK size en (GB) Installation DISK size cn (GB) RAM (GB) Notes Deepin 20.4 ? ...