Skip to Content

Linux🐧

April 29, 2026 by
Jean-Christophe Miler
| No comments yet

Linux Script


Run the update command with a bash script

How to easily update your linux with this bash script>

First create a .sh file>

sudo vi update.sh

Secondly modify the file and insert this command, depending on the linux distribution you have, for example for Fedora linux>

sudo dnf upgrade --refresh -y && sudo dnf autoremove -y

For Debian>

sudo apt update && sudo apt full-upgrade -y

Save the file and enter this command>

sudo chmod +x update.sh

And to run the script>

./update.sh

And there you go 😃


## Commande Linux


TLDR Command

The tldr command provides concise and easy-to-read documentation for various Linux commands. It displays a brief summary of the command, its usage, and common options, making it easier to understand and use complex commands.

You can install tldr on your system by running the following command:

sudo dnf install tldr # For Fedora/RedHat systems

Install it on other Linux distributions using npm or pip3. For more information, check the project

Once installed, you can use tldr to see the documentation for a specific command, like this:

tldr ls



Create a bootable USB drive from an ISO file on Linux

  1. Prepare the USB drive: Insert your USB drive and identify its device name with the command:
lsblk
  1. Unmount the USB drive: If the USB drive is mounted, unmount it with:
sudo umount /dev/sdX1
  1. Write the ISO to the USB drive: Use the dd command to create the bootable USB drive. Replace path/to/your.iso with the path to your ISO file:
sudo dd if=path/to/your.iso of=/dev/sdX bs=4M status=progress

Be very careful with the of parameter to avoid overwriting important data.

  1. Sync and Eject: After the process is complete, ensure that all data is written to the USB drive with:
sync

Then, safely eject the USB drive:

sudo eject /dev/sdX


Journalctl

journalctl is a command-line tool for Linux systems that allows users to view and manage log messages stored in the systemd journal. It provides a powerful way to monitor and troubleshoot system issues.

# Show the most recent log messages
journalctl

# Show log messages from the last hour
journalctl --since "1 hour ago"

# Show log messages from yesterday
journalctl --since "yesterday"

# Search for log messages containing a specific keyword
journalctl | grep keyword

# Follow new log messages as they are generated
journalctl -f

# Show system log messages in a concise format
journalctl -u systemd
---
---

### Disk Space Full?

Check the disk space usage of the file system

```bash
df -h

Show the largest subdirectories

du -sh * | sort -hr | head


Htop Command

htop is an interactive version of the top command in Linux.
It provides a dynamic view of running processes, allowing you to sort, filter, and manage them in real time.

htop



Linux Tools

Ncdu

ncdu is a disk usage analyzer and viewer that provides a detailed breakdown of disk usage on a Linux system. It is a command-line tool that offers a user-friendly interface for navigating and managing disk space.

# Run ncdu to analyze disk usage on the root filesystem
ncdu /

# Run ncdu to analyze disk usage on a specific directory
ncdu /home/user

# Run ncdu with the -q option to disable interactive mode and output the results to a file
ncdu -q / > disk_usage.txt


Ristretto

Ristretto is a lightweight and fast image viewer for the XFCE desktop environment. It is designed to provide a simple and efficient way to view, manage, and manipulate image files on Linux systems.

For the help command>

ristretto -h

Usage:
  ristretto [OPTION…]

Help options:
  -h, --help               Show help options
  --help-all               Show all help options
  --help-gtk               Show GTK+ options

Application options:
  -V, --version            Version information
  -f, --fullscreen         Start in fullscreen mode
  -s, --slideshow          Start a slideshow
  -S, --settings           Show the settings dialog
  --display=DISPLAY        X display to use

This will open the specified image file in Ristretto.

ristretto image.jpg

All images in the folder

ristretto *
in Tech
Jean-Christophe Miler April 29, 2026
Share this post
Sign in to leave a comment