JustToThePoint English Website Version
JustToThePoint en español

How to set up a new Ubuntu

Anyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin, John Von Neumann

Privacy is dead – get over it! Steve Rambam.

BASIC SET UP

    # 1. Update package lists and upgrade existing software
    sudo apt update && sudo apt upgrade -y
    # 2. System & Disk Management, Remote Access & Networking, Text Editors
    # GParted, Graphical partition editor (resize, create, delete partitions).
    # timeshift, System restore utility (create/restore snapshots, like Windows System Restore).
    # ssh, OpenSSH client/server for secure remote access
    # xauth, Required for X11 forwarding (secure GUI over SSH)
    # nfs-kernel-server, Linux-native network file sharing.
    # samba, Windows-compatible file sharing (SMB/CIFS).
    # Neovim, hyperextensible Vim-based text editor.
    # Geany, lightweight IDE with GUI.
    sudo apt install gparted timeshift ssh xauth nfs-kernel-server samba neovim geany

    # 3. Development & Web, Media & Graphics, Productivity.
    # Hugo, a blazing-fast static site generator.
    # curl, a command-line tool for HTTP/FTP requests and downloads.
    # gimp, GNU Image Manipulation Program (Photoshop alternative). and
    # imagemagick, lightweight CLI image processor (convert, resize, mogrify).
    # Example. Convert all PNG into JPG in the current folder, mogrify -format jpg *.png
    # CopyQ, an advanced, open-source clipboard manager.
    sudo apt install hugo curl gimp imagemagick copyq

    # 4. Terminal Eye Candy & Fun
    # fastfetch, fast system info tool (neofetch alternative, shows OS, CPU, memory, etc.)
    # lolcat, rainbow colorizer for terminal output.
    # cowsay and cowsay-off, ASCII art cow that speaks your text.
    # fortune, random quotes/sayings for your terminal.
    sudo apt install fastfetch lolcat cowsay fortune cowsay-off

    # 5. Zsh, Oh My Zsh, modern CLI Tools
    # eza, enhanced 'ls' with colors, icons, git status, and better defaults.
    # bat, a 'cat' clone with syntax-highlighting.
    # ripgrep, a fast, recursive search tool (grep alternative).
    # ncal, enhanced calendar.
    # xmlstarlet, command-line XML toolkit (query, edit, validate XML).
    # fzf is a general-purpose command-line fuzzy finder.
    sudo apt install curl eza bat ripgrep ncal xmlstarlet zsh powerline fonts-powerline fzf

Zsh, also called the Z shell, is a new and extended shell designed for interactive use with plenty of new features and plugin and theme support. Oh My Zsh is a delightful, open source, community-driven -somehow bloated- framework for managing your Zsh configuration.

Command linux tools: find (exec), bat, fzf, exa, ripgrep, youtube-dl, xclip

    # 6. Desktop Environment & Appearance
    # variety, a wallpaper manager for Linux systems.
    # gnome-shell-extension-manager, GUI tool to manage GNOME extensions (enable/disable/configure).
    # gnome-shell-extension-auto-move-windows, auto-move windows to specific workspaces
    # ubuntu-restricted-extras, codecs, Flash, Microsoft fonts, and other proprietary extras.
    # gnome-tweak-tool, an essential utility for customizing the GNOME desktop environment on Linux.
    sudo apt install variety gnome-shell-extension-manager gnome-shell-extension-auto-move-windows ubuntu-restricted-extras gnome-tweak-tool

Gnome extensions:

Install Wrap and Espanso. Wrap is an AI-powered terminal with IDE-like features (autocomplete, blocks, cloud sync). Espanso is an open source, cross-platform text Expander.

    # Warp and Espanso. Download .deb from their respective websites, then,
    sudo dpkg -i warp-terminal_XYZ.deb
    # LocalSend (Snap) is a free, open-source alternative to AirDrop (local peer-to-peer file sharing).
    sudo snap install localsend

    # SYSTEM CONFIGURATION
    # Enable passwordless sudo for all members of the %sudo group
    sudo visudo
    # Then change the %sudo line to the following:
    %sudo  ALL=(ALL) NOPASSWD: ALL

    # 4. Mount permanently a disk
    # Create the mount point (if it doesn't already exist)
    sudo mkdir -p /mnt/data

    sudo nvim /etc/fstab
    # Use 'blkid' to print the universally unique identifier for a device
    # Add the disk entry to /etc/fstab
    UUID=ca04070e-a366-424b-8fa3-c9960c9fbdae /mnt/data ext4 defaults 0 2
    # 5. Disable Wayland
    sudo nvim /etc/gdm3/custom.conf
    # Remove the comment: #WaylandEnable = false
    # 6. Ollama
    curl -fsSL https://ollama.com/install.sh | sh

Flatpak

Flatpak offers a fresh, sandboxed approach to application management that works seamlessly across different distributions.

  1. First, ensure Flatpak + Flathub are set up:

    sudo apt install flatpak
    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    reboot
    
  2. Then, install Web Apps (the site-specific browser manager), Shortwave (an internet radio player that provides access to a station database with over 50,000 stations), Flatseal (a GUI tool to manage Flatpak permissions easily), Zen (a beautifully designed, privacy-focused, and packed with features browser), Loupe (a modern GNOME image viewer) etc.

    flatpak install flathub net.codelogistics.webapps
    flatpak install flathub de.haeckerfelix.Shortwave
    flatpak install flathub com.github.tchx84.Flatseal
    flatpak install flathub org.gnome.Loupe
    # Alternatives Browsers: Zen, Opera, Vivaldi, Tor
    flatpak install flathub app.zen_browser.zen
    flatpak install flathub com.opera.Opera
    flatpak install flathub com.vivaldi.Vivaldi
    flatpak install flathub org.torproject.torbrowser-launcher
    
    # To run a flatpak
    flatpak run net.codelogistics.webapps
    
    # Listing Installed Applications
    flatpak list
    
    # Update all applications
    flatpak update
    
    # Uninstall application
    flatpak uninstall net.codelogistics.webapps
    
    # Grant access to a specific directory
    flatpak override --user --filesystem=/path/to/dir org.example.App
    
    # Allow network access
    flatpak override --user --socket=network org.example.App
    
  3. Create a Web App for Spotify, Netflix, Gmail, your bank, etc. Open Web Apps, click Add, name (e.g., Spotify), URL, choose browser engine and icon, and finally save.
    Enable any “Incognito”, “Isolated profile” or “Do not reuse cookies” options if available.

Ulauncher

Ulauncher: sudo add-apt-repository universe -y && sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher

Extensions: System, Emoji, Clipboard.

Ulauncher doesn't reliably grab Super+Space - let GNOME handle it: Open Settings, Keyboard, View and Customize Shortcuts, Custom Shortcuts, + (Add).

Name: Ulauncher; Command: ulauncher-toggle; Shortcut: Press Super (Windows) + Space.

Tuning Ubuntu, Shortcuts

  1. Settings, Multitasking, Workspaces: Fixed Number of Workspaces (4).
  2. Keyboard, Keyboard Shortcuts, View and Customize Shortcuts. Switch to workspace (1-4): Super + 1-4. Launcher, Launch web browser (Super + E) and terminal (Super + Return, Command: kgx). Close Windows (Super + Q).
  3. Settings, Keyboard, View and Customize Shortcuts. Name: Shutdown; Command: systemctl poweroff ; Shortcut: Ctrl + Alt + D.

SSH

SSH (Secure Shell) is a widely used secured network protocol to access remote computers in a network.

  1. vim /etc/ssh/sshd_config:
      AllowTcpForwarding yes # It allow TCP port forwarding, using SSH as a tunnel between your client and the server.
      X11Forwarding yes # It will forward GUI traffic over the connection above.
      X11DisplayOffset 10
      X11UseLocalhost yes
    
  2. Restart the sshd service: sudo systemctl restart ssh.
  3. If you want to allow the use of graphical applications, you need to add -Y flag:
      ssh -Y userName@ServerSSHIPAddress
    

Python

  1. Install Python runtime environment: sudo apt install -y python3-full python3-pip
  2. Install Visual Studio Code: sudo snap install code --classic. Plugins: Windsurf.
  3. Create a Proper Python Project Structure.
    cd /mnt/data/justothepoint
    mkdir mypython
    cd mypython
    
  4. Create Virtual Environment and a Python Project structure.
    # Create Virtual Environment
    python3 -m venv venv
    source venv/bin/activate
    # Upgrade pip
    pip install --upgrade pip
    # Create a Python Project structure to audit our website
    cd /mnt/data/justothepoint
    mkdir mypython
    cd mypython
    
  5. Create a Python project structure
        mypython/
    
    │
    ├── pyproject.toml
    ├── README.md
    ├── .gitignore
    ├── mypython/
    │ ├── **init**.py
    │ ├── link_checker.py
    │ ├── image_checker.py
    │ ├── image_optimizer.py
    │ ├── markdown_parser.py
    │ └── cli.py
    │
    └── venv/
    
  6. Start Hugo development server automatically/ Visual Studio Code Remote - SSH
  7. On Window (Ollama server). Create environment variable OLLAMA_HOST=0.0.0.0 in Windows System Properties (Win + R, type sysdm.cpl), Environment Variables. Create environment property: OLLAMA_HOST=0.0.0.0:11434. On Ubuntu (Ollama client), install Python client and connect: pip3 install ollama.
  8. Test connection:
import ollama

# Point to your Windows Ollama
ollama.Client(host='http://192.168.1.12:11434').generate(model='llama3.1', prompt='Hello!')

Samba

  1. Install Samba: Update the package list and install Samba: sudo apt update && sudo apt install samba -y.

  2. Create Shared Directory, i.e., the folder you want to share: sudo mkdir -p /mnt/data/share; and set permissions: sudo chown nmaximo7:nmaximo7 /mnt/data/share (Replace with your username/group), sudo chmod 775 /mnt/data/share (It grants owner+group write/read, others read).

  3. Configure Samba: sudo nvim /etc/samba/smb.conf:

      [sambashare]
        comment = Samba on Ubuntu
        force user = nmaximo7 # Maps clients to this user (ensure user exists)
        browseable = yes # Enables Windows clients to browse the shared directory using Windows Explorer.
        path = /mnt/data/share # The path to the shared directory.
        writable = yes # If you want others to be able to change it.
        public = yes # So that everyone can see the shared directory.
    
  4. Check syntax errors in smb.conf sudo testparm. Then, restart Samba: sudo systemctl restart smb. Verify service is active: sudo systemctl status smbd.

  5. Access on Windows. Open File Explorer and type \\dirIP\sambashare in the address bar. Enter your credentials.

  6. Set up NixOS client: Create credentials file: sudo mkdir -p /etc/nixos/smb, sudo nano /etc/nixos/smb/share.creds

    username=nmaximo7
    password=YOUR_PASSWORD_HERE
    domain=WORKGROUP # Match Samba server's workgroup
    

    Secure this file: sudo chmod 600 /etc/nixos/smb/share.creds. Then, add to configuration.nix

    environment.systemPackages = with pkgs; [ cifs-utils ]; # Install CIFS tools
    
    fileSystems."/home/nmaximo7/samba" = {
        device = "//192.168.1.46/sambashare";
        fsType = "cifs";
        options = [
                "x-systemd.automount,noauto,_netdev"  # Mounts on-demand; Skips mount at boot; Marks as network device.
                "credentials=/etc/nixos/smb/share.creds"
                "uid=1000,gid=100,dir_mode=0775,file_mode=0664"
                # Use: id nmaximo7. Directory and file permissions.
                "vers=2.1,nounix,noserverino"
                # Use SMBv2.1. Disables UNIX extensions. Disables server inode numbers.
        ];
    };
    

SSH, NFS Server, and Remote Desktop Protocol

NFS or Network File System is a distributed file system protocol that allows you to share directories over a network. With NFS, you can mount remote directories on your system and work with the files on the remote machine as if they were local files.

Server Side

  1. Installing the NFS server: sudo apt update && sudo apt install nfs-kernel-server.
  2. Create Shared Directory:
    sudo mkdir -p /mnt/data
    sudo chown -R nobody:nogroup /mnt/data/
    sudo chmod 777 /mnt/data
    
  3. Define Exports. Edit nvim /etc/exports to define which directories are shared and with which clients.
    # Add this line:
    /mnt/nfs_share  client_IP(rw,sync,no_subtree_check)
    # Example: /mnt/data 192.168.1.0/24(rw,sync,no_subtree_check)
    # NFS root directory (/mnt/data). Access to this NFS volume is allowed only to the clients from the 192.168.1.0/24 subnet (local network).
    
  4. Save the file and export the share(s): sudo exportfs -a
  5. Firewall configuration: sudo ufw allow from 192.168.1.0/24 to any port nfs. Verify the change: sudo ufw status
  6. Restart the NFS service after reboot: sudo systemctl restart nfs-kernel-server
  7. Enable the built-in RDP server on the Ubuntu machine: Settings, System, Remote Desktop. Toggle Remote Desktop and Remote Login to On.

Set Up the NFS Clients and Remmina

  1. NixOS Configuration, edit configuration.nix:

    fileSystems."/home/nmaximo7/fileserver" = {
        boot.supportedFilesystems = [ "nfs" "nfs4" ];
        device = "//192.168.1.46:/mnt/data";  # NFS Server path
        fsType = "nfs";
        options = [
            "x-systemd.automount" # Mounts on first access
            "noauto" # Add this to prevent auto-mount at boot (safer for network shares)
        ];
    };
    environment.systemPackages = with pkgs; [
        nfs         # Official NFS client package
        rsync       # Backup tool
        openssh     # SSH client
        remmina     # Remote desktop client
    ];
    
  2. Copy public key to server (requires sudo on Ubuntu server): ssh-copy-id nmaximo7@192.168.1.46

  3. Backup Script:

    # The destination path format is user@host:/remote/path
    BACKUP_DEST="nmaximo7@192.168.1.46:/mnt/data/"
    # Backup with rsync
    # Add --progress for visibility during transfers. Use || to catch errors.
    rsync -av --delete --progress "$HOME/dotfiles/" "$BACKUP_DEST/dotfiles" || echo "Backup failed!"
    
  4. Open Remmina on your NixOS desktop. Create a new connection and select RDP as the protocol. Enter the IP address of the Ubuntu machine, username, and password, then click Connect.

Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.