Re-purposing laptops for schools
Why Lubuntu project for schools
Why a Local Lubuntu Repository is a Great Project for Schools & Local Government Setting up a local software repository for Lubuntu and open-source applications is an excellent initiative for schools, libraries, and local government because it promotes digital inclusion, sustainability, and cost savings while preparing communities for a low-carbon future.
Key Benefits for Schools & Local Government
Digital Inclusion & Access to Knowledge
✅ Bridging the Digital Divide – Many schools and public libraries lack internet access or have slow connections. A local repository ensures students and staff can install and update software without needing the internet. ✅ Empowers Underserved Communities – Rural schools, low-income students, and community centers get free access to educational and productivity tools. ✅ Supports Open-Source Education – Promotes the use of free educational software like Khan Academy, Kiwix (offline Wikipedia), and LibreOffice.
Sustainability & Low-Carbon ICT Strategy
✅ Repurposing Old Computers – Keeps low-spec machines useful instead of e-waste. Old computers running Lubuntu can function efficiently with a local repository. ✅ Lower Energy Consumption – Downloading software repeatedly wastes energy; a local server reduces carbon footprint. ✅ Supports a Circular Economy – Encourages reusing hardware instead of buying new devices.
Cost Savings for Schools & Government
✅ Reduces Internet Bandwidth Costs – Schools and government offices save on data costs by reusing locally stored software instead of downloading the same apps multiple times. ✅ Eliminates Licensing Costs – Open-source software (e.g., LibreOffice, GIMP, Scratch) replaces expensive proprietary software like Microsoft Office or Adobe Photoshop. ✅ Efficient IT Management – A single update to the local repository makes software updates easy for all connected computers.
Boosting Local IT Skills & Cybersecurity
✅ Encourages Linux & Open-Source Learning – A great hands-on project for students interested in IT, cybersecurity, and system administration. ✅ Strengthens Local IT Infrastructure – Local governments and schools become less dependent on external services and cloud-based subscriptions. ✅ Protects Against Internet Outages – Even if the internet is down, schools and government offices can still install and update essential software.
How to Implement This Project
📌 For Schools Set up a Raspberry Pi or old PC as a local software server. Use apt-mirror or apt-cacher-ng to store Lubuntu software. Add Kiwix (offline Wikipedia, Khan Academy) to provide offline learning resources. Train IT students to maintain and update the repository.
📌 For Local Government Install a Lubuntu software repository in public libraries, community centers, and council offices. Use open-source productivity tools to replace expensive software (e.g., LibreOffice instead of Microsoft Office). Provide free and open-source software to local businesses and non-profits. Set up an offline Kiwix library with Wikipedia, Khan Academy, and textbooks.
🚀 Future Expansions & Impact
✅ Network-wide Updates – Schools and council offices can update multiple computers at once without downloading software multiple times. ✅ Local Raspberry Pi Labs – Schools can set up low-power Raspberry Pi labs for coding, digital literacy, and IoT projects. ✅ Collaboration with Libraries – Public libraries can distribute free software USBs or allow visitors to install open-source apps from the local repository.
Would you like help designing a step-by-step plan for rolling this out in schools or local government offices? 🚀
Why local servers are more energy efficient
🌱 Why Are Local Servers in Schools More Sustainable Than Cloud Servers? Using a local server in schools to host educational materials, software repositories (Lubuntu, 8-bit software, books), and Scratch is far more sustainable than relying on a cloud-based server. Here’s why:
🌍 1️⃣ Lower Carbon Footprint & Energy Efficiency
✅ Cloud Servers = High Energy Consumption
Cloud servers run in data centers that require huge amounts of electricity for computing and cooling. Data centers often rely on fossil fuels unless they are powered by 100% renewable energy. Each time a student accesses software from the cloud, data must be transferred over long distances, increasing energy use.
✅ Local Servers = Minimal Energy Use
A low-power local server (like a Raspberry Pi, repurposed PC, or mini-server) uses significantly less energy. No need for energy-intensive air conditioning and cooling infrastructure like in large data centers. Schools can power local servers using solar panels, further reducing carbon emissions.
📡 2️⃣ Reduced Internet Bandwidth & Cost Savings
✅ Cloud = High Internet Usage & Costs
Each time a student downloads or installs software from the cloud, it consumes internet bandwidth. Large schools = thousands of students downloading software, leading to higher data costs and network congestion. Slow internet connections can make cloud-based access unreliable.
✅ Local Server = Fast & Free Access
Software is stored locally, meaning no repeated downloads from the internet. All students can install software instantly without slowing down the school’s internet. Schools save money by reducing dependence on external servers.
💾 3️⃣ Digital Resilience & Offline Access
✅ Cloud = Dependence on External Services
If cloud services go down (server outage, internet failure, company shutdown), students and teachers lose access to resources. Subscription-based services may eventually become too expensive or discontinued.
✅ Local Server = Always Available
Works even when the internet is down, ensuring uninterrupted learning. Schools retain full control over their educational resources. Open-source software (Lubuntu, 8-bit emulators, books, Scratch) remains accessible for decades.
📚 4️⃣ Supports a Circular Economy (E-Waste Reduction)
✅ Cloud = More Demand for New Hardware
Cloud services often require fast internet and modern devices. Schools may feel pressured to buy new laptops & tablets instead of using old computers.
✅ Local Server = Extends the Life of Old Computers
Schools can repurpose old PCs as lightweight Lubuntu machines, running software from the local server. Supports legacy software, including 8-bit computing tools, educational books, and offline Scratch environments. Helps reduce e-waste and minimize the environmental impact of ICT.
🔧 How to Set Up a Sustainable Local Server in Schools
💻 Hardware: Use a Raspberry Pi, old laptop, or small Linux server. 📀 Software Repository: Set up Apt-Mirror or Apt-Cacher-NG for Lubuntu & open-source software. 📚 Offline Educational Content: Install Kiwix for Wikipedia, Khan Academy, and free textbooks. 🎮 8-bit Computing & Scratch: Host emulators (ZX Spectrum, Atari, Apple II) and offline Scratch. ⚡ Renewable Energy: If possible, power the server using solar panels.
How to prepare for low carbon future in schools
🌱 Preparing for a Low-Carbon Future in ICT with a Focus on Education
To build a sustainable ICT future while ensuring quality education, we need to reduce carbon emissions from technology while maximizing access to knowledge. Here’s a strategic approach that balances sustainability, digital access, and education.
1️⃣ Extend the Lifespan of Existing ICT Equipment
🖥️ Problem:
The ICT industry generates tons of e-waste, as schools and institutions discard outdated computers that are still functional. Manufacturing new devices produces huge carbon emissions due to mining, production, and transport.
✅ Solution:
Refurbish & reuse old computers instead of buying new ones. Install lightweight operating systems like Lubuntu, Debian, or Raspberry Pi OS to keep older machines functional. Use local software repositories so students can access software without needing high-speed internet. Encourage DIY repair skills by teaching students how to maintain their school’s ICT infrastructure. Example: Schools can convert 10-year-old laptops into functional computers using Lubuntu, allowing students to use Scratch, Python, and educational tools without high resource demand.
2️⃣ Set Up Local & Offline Educational Servers
🌍 Problem:
Cloud-based learning (Google Classroom, Microsoft 365, etc.) requires constant internet access, which increases energy use through data centers. Schools in remote or low-income areas struggle with slow, expensive, or unavailable internet access.
✅ Solution:
Deploy local school servers running Kiwix, which hosts Wikipedia, Khan Academy, and open-access books offline. Create local repositories for open-source software (Lubuntu, LibreOffice, Scratch, 8-bit emulators). Use Raspberry Pi or low-power mini PCs as networked education servers in classrooms. Example: A library or school computer lab could host a local repository that allows students to install software and access books without using cloud services.
3️⃣ Reduce Cloud Dependence & Optimize Software Choices
💾 Problem:
Cloud services consume massive amounts of energy. Modern software is increasingly bloated, requiring powerful hardware.
✅ Solution:
Use lightweight, open-source software that requires fewer computing resources (e.g., AbiWord instead of MS Word, GIMP instead of Photoshop). Promote self-hosted alternatives to cloud services (e.g., Nextcloud for document storage instead of Google Drive). Implement P2P file-sharing within schools to distribute software & updates without excessive internet use. Example: Teaching with open-source software (LibreOffice, GIMP, FreeCAD, Inkscape) reduces dependency on carbon-heavy corporate cloud services.
4️⃣ Develop Low-Power Computing & Renewable Energy Solutions
⚡ Problem:
Traditional computing infrastructure is power-intensive and relies on fossil-fuel-generated electricity. Schools often leave computers running all day, leading to unnecessary energy waste.
✅ Solution:
Use low-power computing solutions like Raspberry Pi-based learning labs. Schedule automatic shutdowns for school computers to save energy. Integrate solar-powered ICT infrastructure in schools to power local servers, routers, and laptops. Example: A Raspberry Pi-powered offline Scratch & coding lab allows students to learn programming without high-power computers or an internet connection.
5️⃣ Digital Literacy for Sustainability
📚 Problem:
Schools focus on ICT skills (coding, AI, cloud computing) but rarely teach sustainable computing. Many students and teachers don’t realize the carbon impact of data centers, AI models, and digital waste.
✅ Solution:
Teach “Green Computing” principles: 🔹 How to choose energy-efficient software & hardware 🔹 Why cloud computing increases carbon footprints 🔹 How to optimize computers for sustainability Introduce electronics repair & e-waste recycling as part of STEM education. Encourage local file-sharing (USB sticks, school networks) instead of cloud downloads. Example: A high school course on Green Computing can teach students how to optimize old laptops, reduce power consumption, and repurpose e-waste into useful tools.
6️⃣ Build Sustainable & Resilient ICT Infrastructure
🏫 Problem:
Schools rely on fragile external internet & cloud services. A natural disaster or power failure can cut off access to educational tools.
✅ Solution:
Set up local intranet-based digital libraries with open educational resources. Use P2P software distribution to share software updates without needing an external connection. Encourage municipal/local government participation in building low-energy educational networks. Example: A school district runs a local software & book repository, cutting costs & reducing CO₂ emissions from internet use.
🚀 Final Thoughts: A Call to Action
A low-carbon ICT future for education means: ✅ Using existing hardware instead of buying new. ✅ Creating offline educational resources for schools. ✅ Choosing lightweight, open-source software. ✅ Powering ICT with solar and low-energy solutions. ✅ Teaching sustainable computing as part of digital literacy.
Would you like a step-by-step guide to implementing these solutions in schools or local government? 🚀
Step by Step Guide
📖 Step-by-Step Guide: Setting Up a Low-Carbon ICT Infrastructure for Schools & Local Government This guide will help schools, libraries, and local governments set up sustainable, low-power ICT solutions using refurbished computers, local software repositories, offline digital libraries, and solar-powered solutions.
🔹 Step 1: Plan Your ICT Sustainability Goals
📌 Define the Objectives Reduce electronic waste by repurposing old computers. Reduce cloud dependence by using local servers. Provide offline access to educational resources (Khan Academy, Wikipedia, Scratch, etc.). Lower energy use with lightweight software and low-power devices. Teach students about sustainable computing and green ICT practices. 🎯 Target Audience:
Schools & universities Libraries & community centers Local government offices 🔹 Step 2: Collect & Prepare Low-Spec ICT Equipment
📌 Identify Available Hardware Check if old computers or laptops (minimum 1GB RAM, 20GB storage) are available from: 🔹 Schools (old computer labs) 🔹 Local government offices 🔹 Community tech donation programs Use Raspberry Pi or low-power mini-PCs for offline servers. 📌 Install a Lightweight OS For best performance on old machines: ✅ Lubuntu (best for older laptops/desktops) ✅ Raspberry Pi OS (for Raspberry Pi servers) ✅ Debian Minimal (for ultra-low power setups)
How to Install Lubuntu: 1️⃣ Download the Lubuntu ISO from https://lubuntu.me/ 2️⃣ Create a bootable USB using Rufus (Windows) or dd (Linux/Mac) 3️⃣ Boot the old computer from USB and install Lubuntu 4️⃣ Remove unnecessary software and install lightweight applications
🔹 Step 3: Set Up a Local Software Repository
📌 Why Use a Local Repository? Avoids downloading the same software multiple times from the internet. Enables offline installation of educational apps (AbiWord, LibreOffice, Scratch, etc.). Reduces network congestion & energy use. 📌 How to Set Up a Lubuntu Local Repository 1️⃣ Install Apache or Nginx to host files locally:
sudo apt install apache2 -y 2️⃣ Download required .deb packages:
apt-get download abiword libreoffice scratch 3️⃣ Store them in /var/www/html/repo/ and allow network access. 4️⃣ On client computers, add the repository URL:
sudo nano /etc/apt/sources.list Add:
deb [trusted=yes] http://your-local-server/repo ./ 5️⃣ Run:
sudo apt update && sudo apt install abiword 🔹 Alternative: Schools can use Debian’s Apt-Cacher-NG to cache software for multiple computers.
🔹 Step 4: Install Offline Educational Resources
📌 Use Kiwix for Offline Access to Wikipedia, Khan Academy & More ✅ Install Kiwix (offline web content reader):
sudo apt install kiwix-tools ✅ Download Kiwix content packs (ZIM files):
Wikipedia: https://download.kiwix.org/zim/wikipedia/ Khan Academy: https://download.kiwix.org/zim/other/ ✅ Host them on a local school server. ✅ Students can access Wikipedia, Khan Academy & books via WiFi without the internet. 🔹 Step 5: Deploy an Offline Learning Platform
📌 Install Kolibri (Offline LMS for Schools) Kolibri is an offline education platform with interactive lessons, videos, and exercises. ✅ Install it on Lubuntu:
sudo apt install kolibri ✅ Download courses for math, science, and programming. ✅ Schools can create customized digital classrooms without needing internet access.
🔹 Step 6: Set Up a Low-Power Server
A Raspberry Pi 4 (or an old PC) can act as a school server to host: ✅ Local software repository ✅ Offline Wikipedia/Khan Academy via Kiwix ✅ Kolibri for student lessons
📌 How to Set Up a Local Server 1️⃣ Install Ubuntu Server or Raspberry Pi OS. 2️⃣ Use Samba to create a shared network folder:
sudo apt install samba 3️⃣ Store offline educational materials in /srv/shared/. 4️⃣ Students access resources via network share or a simple web interface.
🔹 Step 7: Implement Solar-Powered ICT Labs
📌 Why Use Solar-Powered Labs? Reduces electricity dependence. Enables computing access in remote/off-grid locations. 📌 Basic Setup for a Solar ICT Lab ✅ Solar Panel (100-300W) + Charge Controller ✅ 12V Deep Cycle Battery (100Ah or more) ✅ Inverter (or direct 12V adapters for Raspberry Pi & laptops) ✅ Low-power computers (Raspberry Pi, Lubuntu laptops)
Example: A solar-powered Raspberry Pi server can host educational materials for a rural school with no internet.
🔹 Step 8: Train Teachers & Students in Green Computing
📌 What to Teach? ✅ Why e-waste is a problem ✅ How to install and use open-source software ✅ How to maintain and repair old computers ✅ How to set up local educational networks
Example: Schools can hold hackathons where students revive old computers, install Lubuntu, and set up an offline learning lab. 🔹 Step 9: Expand to Local Government & Libraries
Local governments & libraries can: ✅ Provide refurbished computers to schools. ✅ Host public-access digital repositories. ✅ Offer free local Wi-Fi with offline Wikipedia & books.
Example: A library server could host thousands of books, software, and offline courses for public access. 🔹 Step 10: Share & Scale the Project
✅ Document the process (blogs, YouTube tutorials). ✅ Partner with other schools, NGOs, and government agencies. ✅ Scale up by creating regional low-carbon ICT hubs.
🚀 Final Thoughts
By following this guide, schools, libraries, and local governments can: ✅ Reduce carbon footprints from ICT. ✅ Provide education without relying on the internet. ✅ Make technology accessible in low-income & remote areas. ✅ Empower students with hands-on skills in green computing.
Would you like a detailed hardware shopping list or pre-built scripts for easier setup? 🚀
8-bit computers as a learning resource in low carbon future
Yes, 8-bit computers and emulators could be an excellent teaching model in a low-carbon future with serious resource limitations. Here's why:
1. Low Energy Requirements
8-bit computers consume minimal power, especially compared to modern PCs and cloud-based computing. Emulators can run efficiently on low-power devices (e.g., Raspberry Pi, old laptops).
2. Abundance of Educational Resources
Thousands of books and programs exist for 8-bit systems like the Apple II, Commodore 64, and ZX Spectrum. These books teach fundamental programming principles in a simple, accessible way.
3. Focus on Core Computational Thinking
Unlike modern software that relies on massive libraries, 8-bit computing forces students to think about memory, efficiency, and problem-solving. BASIC, Assembly, and Pascal on 8-bit machines help build strong coding fundamentals without unnecessary complexity.
4. Encouraging Reuse and Extending Lifespan
Using old hardware or repurposing e-waste aligns with circular economy principles. Teaching with emulators means you don’t need new hardware, reducing the demand for new electronics.
5. Historical and Practical Relevance
Many modern embedded systems and IoT devices are closer in capability to 8-bit computers than to full modern PCs. Understanding efficient coding (as done in 8-bit systems) is useful for low-power computing and microcontrollers.
6. Supports Offline, Decentralized Learning
8-bit software and books can be stored locally, avoiding the need for cloud services that require energy-intensive data centers. Students can learn computing without an internet connection, making it viable for remote and off-grid education. Challenges and Considerations
8-bit systems lack modern networking and graphical tools, so they may not be suitable for some advanced applications. Some educational programs may need adaptation for modern relevance (e.g., data science, cybersecurity).
Encouraging students to work with modern low-power systems (like RISC-V microcontrollers) alongside 8-bit emulation could offer the best balance.
Conclusion
While 8-bit computers are outdated for modern applications, they are highly relevant for teaching computational thinking, coding fundamentals, and low-energy computing. In a low-carbon future, they offer an efficient, accessible, and resource-conscious way to learn programming without excessive hardware demands.
Overview
Here are 15 applications available in Lubuntu's Discover (software manager) that are useful for primary school education:
Learning & Educational Apps
- Tux Typing – Fun typing tutor with games for children.
- GCompris – A suite of educational activities covering math, reading, and logic.
- TuxMath – A math game where kids solve equations to defend penguins.
- KBruch – Helps students practice fractions and arithmetic.
- KAlgebra – A visual mathematics tool for algebra and graphing.
Coding & STEM Apps
- Scratch – A visual programming environment for learning coding.
- KTurtle – A simple programming tool for learning basic coding concepts.
- Blockly – A block-based coding environment similar to Scratch.
Science & Geography
- Stellarium – Interactive astronomy software for exploring the night sky.
- Marble – A virtual globe for geography exploration.
- Celestia – A space exploration app that allows students to explore the universe.
Creativity & Drawing
- Tux Paint – A fun and simple drawing program for kids.
- LibreOffice Draw – A versatile tool for creating diagrams and illustrations.
Reading & Writing
- KHangMan – A fun hangman-style word game to improve vocabulary.
- Parley – A flashcard-based language learning tool.
LXLE Linux
LXLE is based on Lubuntu (LTS versions) and Lightweight X11 Desktop Environment (LXDE), so books covering Lubuntu, LXDE, and lightweight Linux distributions will be relevant. Here are some good books that can help you understand and work with LXLE:
General Linux Books (Beginner-Friendly) The Linux Command Line: A Complete Introduction – William Shotts
Great for learning Linux basics, including command-line operations relevant to LXLE. Linux Pocket Guide – Daniel J. Barrett
A compact reference guide that helps with Linux commands and system management. How Linux Works: What Every Superuser Should Know – Brian Ward
Explains Linux internals, useful for tweaking LXLE performance on older hardware. Books on Lightweight Linux and LXDE - Linux for Beginners: An Introduction to the Linux Operating System and Command Line – Jason Cannon
A good starting point for users unfamiliar with Linux but using lightweight distributions like LXLE. Lubuntu Manual (Online Resource)
Since LXLE is based on Lubuntu LTS, the Lubuntu manual is a good reference: https://manual.lubuntu.me - Mastering Linux System Administration – Christine Bresnahan & Richard Blum
Covers managing Linux systems efficiently, useful for running LXLE on minimal hardware. For Advanced Users (Customization & Optimization) - UNIX and Linux System Administration Handbook – Evi Nemeth, Garth Snyder, Trent R. Hein
If you want to dive deeper into system administration, this book is useful for managing LXLE on older PCs. Linux Bible – Christopher Negus A comprehensive book covering various Linux distributions, including lightweight ones.
Set up a local repository for Lubuntu
To set up a local repository for Lubuntu so that students can download and install software without internet access, you can follow these steps:
1. Set Up a Machine as a Repository Server
You’ll need a central machine (e.g., a Linux server or a Lubuntu laptop) that will store the repository files and serve them over a local network.
Install Required Packages
On the server, install dpkg-dev to create and manage a local repository:
sudo apt update sudo apt install dpkg-dev apache2
2. Download Required Software Packages
Since the students’ laptops won’t have internet access, you’ll need to download .deb packages and their dependencies on a machine that has internet access.
Using apt-get download
On a computer with internet access, run:
mkdir ~/offline-repo cd ~/offline-repo apt-get download scratch evince
This will download the .deb files for Scratch and Evince into ~/offline-repo/.
Using apt-cache depends (Optional)
To get a full list of dependencies, run:
apt-cache depends scratch evince
Then manually download any missing .deb files.
Copy Files to the Repository Server
Transfer the downloaded .deb files to the repository server using a USB drive or network transfer.
3. Organize and Index the Repository
Move the .deb files to a dedicated directory on the repository server, e.g., /var/www/html/lubuntu-repo/:
sudo mkdir -p /var/www/html/lubuntu-repo sudo cp ~/offline-repo/*.deb /var/www/html/lubuntu-repo/
Generate the repository metadata:
cd /var/www/html/lubuntu-repo dpkg-scanpackages . /dev/null | gzip -9c | sudo tee Packages.gz >/dev/null
This creates a Packages.gz file, which allows apt to recognize the repository.
Ensure the directory is readable by Apache:
sudo chmod -R a+r /var/www/html/lubuntu-repo
4. Configure Students’ Laptops to Use the Local Repository
On each Lubuntu laptop, add the local repository to the sources.list file:
echo "deb [trusted=yes] http://<server-ip>/lubuntu-repo ./" | sudo tee /etc/apt/sources.list.d/localrepo.list
Replace <server-ip> with the actual IP address of your repository server.
Update package lists:
sudo apt update
Students can now install software from the local repository using:
sudo apt install scratch evince
5. (Optional) Distribute Software Using USB Instead of a Server
If setting up a local server isn’t feasible, you can manually install packages using a USB drive: 1. Copy the .deb files to a USB. 2. Transfer them to student laptops. 3. Install them manually:
sudo dpkg -i scratch_*.deb evince_*.deb
4. Fix missing dependencies if needed:
sudo apt --fix-broken install
This setup allows students to install software on their Lubuntu laptops without needing internet access. Let me know if you need refinements!
Setting up a Apache server for .deb files for offline installation
edmond@edmond-macbookair72:~$ sudo apt update
[sudo] password for edmond:
Hit:1 http://au.archive.ubuntu.com/ubuntu oracular InRelease
Hit:2 http://au.archive.ubuntu.com/ubuntu oracular-updates InRelease
Hit:3 http://au.archive.ubuntu.com/ubuntu oracular-backports InRelease
Get:4 http://au.archive.ubuntu.com/ubuntu oracular/main Translation-en_AU [1,960 B]
Get:5 http://au.archive.ubuntu.com/ubuntu oracular/universe Translation-en_AU [1,132 B]
Get:6 http://au.archive.ubuntu.com/ubuntu oracular/restricted Translation-en_AU [528 B]
Get:7 http://au.archive.ubuntu.com/ubuntu oracular/multiverse Translation-en_AU [45.2 kB]
Hit:8 http://security.ubuntu.com/ubuntu oracular-security InRelease
Fetched 48.9 kB in 1s (50.5 kB/s)
All packages are up to date.
edmond@edmond-macbookair72:~$ sudo apt install dpkg-dev apache2
The following package was automatically installed and is no longer required:
python3-netifaces
Use 'sudo apt autoremove' to remove it.
Installing:
apache2 dpkg-dev
Installing dependencies:
apache2-bin g++-x86-64-linux-gnu libaprutil1t64 liblsan0
apache2-data gcc libasan8 libquadmath0
apache2-utils gcc-14 libbinutils libsframe1
binutils gcc-14-x86-64-linux-gnu libcc1-0 libstdc++-14-dev
binutils-common gcc-x86-64-linux-gnu libctf-nobfd0 libtsan2
binutils-x86-64-linux-gnu libalgorithm-diff-perl libctf0 libubsan1
build-essential libalgorithm-diff-xs-perl libfakeroot lto-disabled-list
fakeroot libalgorithm-merge-perl libgcc-14-dev make
g++ libapr1t64 libgprofng0
g++-14 libaprutil1-dbd-sqlite3 libhwasan0
g++-14-x86-64-linux-gnu libaprutil1-ldap libitm1
Suggested packages:
apache2-doc gprofng-gui gcc-14-doc libtool gcc-doc libstdc++-14-doc
apache2-suexec-pristine debian-keyring gcc-multilib flex gcc-14-multilib make-doc
| apache2-suexec-custom g++-multilib autoconf bison gcc-14-locales
binutils-doc g++-14-multilib automake gdb gdb-x86-64-linux-gnu
Summary:
Upgrading: 0, Installing: 43, Removing: 0, Not Upgrading: 0
Download size: 60.5 MB
Space needed: 215 MB / 103 GB available
Continue? [Y/n] y
edmond@edmond-macbookair72:~$ mkdir ~/offline-repo
edmond@edmond-macbookair72:~$ cd offline-repo/
edmond@edmond-macbookair72:~/offline-repo$ apt-get download scratch evince
Get:1 http://au.archive.ubuntu.com/ubuntu oracular/main amd64 evince amd64 46.3.1-1 [283 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu oracular/universe amd64 scratch all 1.4.0.6~dfsg1-6.1 [25.1 MB]
Fetched 25.4 MB in 6s (4,220 kB/s)
edmond@edmond-macbookair72:~/offline-repo$ apt-get download abiword
Get:1 http://au.archive.ubuntu.com/ubuntu oracular/universe amd64 abiword amd64 3.0.5~dfsg-3.3build1 [950 kB]
Fetched 950 kB in 1s (1,866 kB/s)
edmond@edmond-macbookair72:~/offline-repo$ cd ..
edmond@edmond-macbookair72:~$ sudo mkdir -p /var/www/html/lubuntu-repo
edmond@edmond-macbookair72:~$ sudo cp ~/offline-repo/*.deb /var/www/html/lubuntu-repo/
edmond@edmond-macbookair72:~$ cd /var/www/html/lubuntu-repo
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ ls
abiword_3.0.5~dfsg-3.3build1_amd64.deb evince_46.3.1-1_amd64.deb scratch_1.4.0.6~dfsg1-6.1_all.deb
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
bash: Packages.gz: Permission denied
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
bash: Packages.gz: Permission denied
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ ls -ld /
drwxr-xr-x 19 root root 4096 Mar 5 18:57 /
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ chmod u+w .
chmod: changing permissions of '.': Operation not permitted
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo dpkg-scanpackages . /dev/null | gzip -9c | sudo tee Packages.gz > /dev/null
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: abiword evince scratch
dpkg-scanpackages: info: Wrote 3 entries to output Packages file.
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo chmod -R a+r /var/www/html/lubuntu-repo
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ ifconfig
Command 'ifconfig' not found, but can be installed with:
sudo apt install net-tools
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo apt install net-tools
The following package was automatically installed and is no longer required:
python3-netifaces
Use 'sudo apt autoremove' to remove it.
Installing:
net-tools
Summary:
Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
Download size: 204 kB
Space needed: 807 kB / 103 GB available
Get:1 http://au.archive.ubuntu.com/ubuntu oracular/main amd64 net-tools amd64 2.10-1.1ubuntu1 [204 kB]
Fetched 204 kB in 0s (1,343 kB/s)
Selecting previously unselected package net-tools.
(Reading database ... 325165 files and directories currently installed.)
Preparing to unpack .../net-tools_2.10-1.1ubuntu1_amd64.deb ...
Unpacking net-tools (2.10-1.1ubuntu1) ...
Setting up net-tools (2.10-1.1ubuntu1) ...
Processing triggers for man-db (2.12.1-3) ...
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 445 bytes 39552 (39.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 445 bytes 39552 (39.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00e04c0bfb5c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.135 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fd93:4f2d:8491:44b6:ef19:b566:1b9e:73fe prefixlen 64 scopeid 0x0<global>
inet6 fd93:4f2d:8491:44b6:c4be:2b22:fd5e:3f61 prefixlen 64 scopeid 0x0<global>
inet6 fe80::f846:9fb2:ab14:b24b prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:0b:fb:5c txqueuelen 1000 (Ethernet)
RX packets 769934 bytes 1145707320 (1.1 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 342131 bytes 32283905 (32.2 MB)
TX errors 0 dropped 4 overruns 0 carrier 0 collisions 0
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ ls
abiword_3.0.5~dfsg-3.3build1_amd64.deb Packages.gz
evince_46.3.1-1_amd64.deb scratch_1.4.0.6~dfsg1-6.1_all.deb
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo dpkg -i scratch_1.4.0.6~dfsg1-6.1_all.deb
Selecting previously unselected package scratch.
(Reading database ... 325213 files and directories currently installed.)
Preparing to unpack scratch_1.4.0.6~dfsg1-6.1_all.deb ...
Unpacking scratch (1.4.0.6~dfsg1-6.1) ...
dpkg: dependency problems prevent configuration of scratch:
scratch depends on squeak-vm; however:
Package squeak-vm is not installed.
dpkg: error processing package scratch (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.18-1) ...
Processing triggers for man-db (2.12.1-3) ...
Processing triggers for shared-mime-info (2.4-5) ...
Errors were encountered while processing:
scratch
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo apt install squeak-vm
The following package was automatically installed and is no longer required:
python3-netifaces
Use 'sudo apt autoremove' to remove it.
Installing:
squeak-vm
Summary:
Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
1 not fully installed or removed.
Download size: 537 kB
Space needed: 1,683 kB / 103 GB available
Get:1 http://au.archive.ubuntu.com/ubuntu oracular/universe amd64 squeak-vm amd64 1:4.10.2.2614+20120917~dfsg-2 [537 kB]
Fetched 537 kB in 1s (736 kB/s)
Selecting previously unselected package squeak-vm.
(Reading database ... 326411 files and directories currently installed.)
Preparing to unpack .../squeak-vm_1%3a4.10.2.2614+20120917~dfsg-2_amd64.deb ...
Unpacking squeak-vm (1:4.10.2.2614+20120917~dfsg-2) ...
Setting up squeak-vm (1:4.10.2.2614+20120917~dfsg-2) ...
Setting up scratch (1.4.0.6~dfsg1-6.1) ...
Processing triggers for shared-mime-info (2.4-5) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for man-db (2.12.1-3) ...
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$ sudo dpkg -i scratch_1.4.0.6~dfsg1-6.1_all.deb
(Reading database ... 326467 files and directories currently installed.)
Preparing to unpack scratch_1.4.0.6~dfsg1-6.1_all.deb ...
Unpacking scratch (1.4.0.6~dfsg1-6.1) over (1.4.0.6~dfsg1-6.1) ...
Setting up scratch (1.4.0.6~dfsg1-6.1) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for hicolor-icon-theme (0.18-1) ...
Processing triggers for man-db (2.12.1-3) ...
Processing triggers for shared-mime-info (2.4-5) ...
edmond@edmond-macbookair72:/var/www/html/lubuntu-repo$
Apache file server
Sure! Here’s how to set up Apache on Lubuntu for read-only file sharing over a local WiFi network.
Step 1: Install Apache
Open a terminal and run:
sudo apt update && sudo apt install apache2 -y
This installs and starts the Apache web server.
To ensure Apache runs on startup:
sudo systemctl enable apache2
Step 2: Place Files in the Web Directory
Apache serves files from /var/www/html/ by default. 1. Copy your files to the web directory:
sudo cp -r /path/to/files /var/www/html/
2. Set the correct permissions:
sudo chmod -R 755 /var/www/html/ sudo chown -R www-data:www-data /var/www/html/
Step 3: Enable Directory Listing (Optional)
If you want users to see a list of files in the browser: 1. Open the Apache configuration file:
sudo nano /etc/apache2/apache2.conf
2. Find the block that starts with <Directory /var/www/> and modify it:
<Directory /var/www/html/>
Options +Indexes AllowOverride None Require all granted
</Directory>
3. Save and exit (Ctrl + X, then Y, then Enter).
4. Restart Apache for the changes to take effect:
sudo systemctl restart apache2
Step 4: Find Your Local IP Address
Run:
ip a | grep inet
Look for an IP like 192.168.X.X under wlan0 (WiFi) or eth0 (Ethernet).
Step 5: Access the Files from Another Device
On another device connected to the same WiFi network, open a web browser and go to:
http://<your-lubuntu-ip>/
If you enabled directory listing, users can browse and download files.
Security Notes • This setup allows read-only access. • If you don’t want public access, you can restrict it using a firewall:
sudo ufw allow from 192.168.1.0/24 to any port 80
(Replace 192.168.1.0/24 with your actual network range.)
This is a lightweight solution, perfect for sharing files on Lubuntu! Let me know if you need any tweaks.
Preventing access to parent folders in Apache
Yes, Apache can serve folders as well, but you need to enable directory listing so users can browse and download files inside folders.
Ensuring Apache Serves Folders Correctly
By default, if you place a folder inside /var/www/html/, Apache will serve it. However, without directory listing enabled, visitors will get a “403 Forbidden” error unless an index.html file is inside the folder.
Step 1: Enable Directory Listing for Folders 1. Open the Apache configuration file:
sudo nano /etc/apache2/apache2.conf
2. Locate this section:
<Directory /var/www/>
Options Indexes FollowSymLinks AllowOverride None Require all granted
</Directory>
If Indexes is missing, add it to the Options line:
Options +Indexes
3. Save the file (Ctrl + X, then Y, then Enter).
4. Restart Apache:
sudo systemctl restart apache2
Step 2: Add Your Folders to /var/www/html/
You can now copy entire folders into /var/www/html/:
sudo cp -r /path/to/folder /var/www/html/
Ensure correct permissions:
sudo chmod -R 755 /var/www/html/ sudo chown -R www-data:www-data /var/www/html/
Step 3: Access Folders via a Browser
On another device, open a browser and go to:
http://<your-lubuntu-ip>/foldername/
You should now see a directory listing of all files inside the folder.
Bonus: Prevent Access to Parent Directories
To prevent users from navigating outside the shared directory: 1. Open Apache’s security configuration:
sudo nano /etc/apache2/conf-available/security.conf
2. Set Options -Indexes outside the <Directory> block to prevent indexing outside /var/www/html/.
3. Restart Apache:
sudo systemctl restart apache2
Now, users on your local network can browse folders and download files just like a lightweight file server! Let me know if you need further refinements.
chmod Understanding the basics
Understanding chmod Basics
chmod modifies permissions for owner, group, and others using:
Numeric mode (chmod 755 file) Symbolic mode (chmod u+r file) Each permission has a number:
4 = Read (r) 2 = Write (w) 1 = Execute (x) A permission like chmod 755 means:
7 (Owner: rwx → Full control) 5 (Group: r-x → Read & execute) 5 (Others: r-x → Read & execute) Example 1: Making a Script Executable
Scenario: You have a Bash script (myscript.sh) that needs to be run but is not executable. Command:
chmod 755 myscript.sh Why?
7 (Owner: Read, write, execute → Can edit & run) 5 (Group/Others: Read & execute → Can run but not edit) This ensures the script can be executed by anyone without allowing modification.
Example 2: Protecting a Configuration File
Scenario: A config file (config.cfg) should only be readable by the owner to prevent unauthorized access. Command:
chmod 600 config.cfg Why?
6 (Owner: Read & write → Can modify) 0 (Group/Others: No access) This protects sensitive settings from being read or changed by others.
Example 3: Allowing a Group to Edit a Shared File
Scenario: A team is collaborating on a document (report.txt), and all team members (same group) should be able to edit it. Command:
chmod 664 report.txt Why?
6 (Owner: Read & write) 6 (Group: Read & write → Team can edit) 4 (Others: Read-only) This lets the team edit the file while preventing changes from outsiders.
Example 4: Making a Folder Readable & Executable (but Not Writable) for Others
Scenario: You have a public folder (/var/www/public_html) containing files that should be viewable but not modifiable. Command:
chmod 755 /var/www/public_html Why?
7 (Owner: Full access) 5 (Group/Others: Read & execute, no write) This ensures users can access and list files inside the folder but not delete or add files.
Example 5: Preventing Accidental Deletion of a Folder
Scenario: A folder (/backups/) contains important backups that should not be modified or deleted accidentally. Command:
chmod 555 /backups/ Why?
5 (Owner/Group/Others: Read & execute, no write) This ensures that files can be accessed but not modified or deleted.
Example 6: Securely Storing Private SSH Keys
Scenario: SSH keys (id_rsa) should only be accessible by the owner. Command:
chmod 600 ~/.ssh/id_rsa Why?
6 (Owner: Read & write) 0 (No access for group or others) SSH requires this strict permission to prevent unauthorized access.
Example 7: Creating a Public Upload Directory (Writable but Not Executable)
Scenario: Users should be able to upload files but not execute scripts in /var/www/uploads/. Command:
chmod 733 /var/www/uploads/ Why?
7 (Owner: Full control) 3 (Group: Write & execute → Can add/remove files but not list them) 3 (Others: Same as group) This allows uploads but prevents execution of malicious scripts.
Example 8: Allowing a Group to Manage a Folder (but Not Others)
Scenario: A group (developers) needs full access to /opt/project/, but others should only view files. Command:
chmod 775 /opt/project/ Why?
7 (Owner: Full control) 7 (Group: Full control) 5 (Others: Read & execute) This ensures group members can work, while others can only view.
Final Notes
Use chmod -R to change permissions recursively: chmod -R 755 /var/www/ (Applies permissions to all subdirectories and files.) Combine chmod with chown to set ownership: sudo chown user:group file.txt (Ensures the correct user/group has control.) Would you like examples related to specific use cases in Lubuntu?