User Tools

Site Tools


linux:linux_tips

This is an old revision of the document!


linux grep per paragraph

Wrong TimeZone on OpenSuse

cp /usr/share/zoneinfo/Europe/Riga /etc/localtime

Opensuse 12.3

Loop back not working

Add:

echo loop > /etc/modules-load.d/loop.conf

Crontab isn't working even if sevice seems working

systemctl enable cron.service 

VNC blank screen

install the basic desktop on CentOS:

yum groupinstall basic-desktop

Screen

Screen is deprecated into Redhat, now replaced by TMUX

Screen (command) is a background terminal, you can start applications in background, quit your windows and recall your session.

Start a sceen session using a specific name

# screen -S session_name

Help

Ctrl+a ?

Below are some most common commands for managing Linux Screen Windows:

  • Ctrl+a c Create a new window (with shell).
  • Ctrl+a “ List all windows.
  • Ctrl+a 0 Switch to window 0 (by number).
  • Ctrl+a A Rename the current window.
  • Ctrl+a S Split current region horizontally into two regions.
  • Ctrl+a | Split current region vertically into two regions.
  • Ctrl+a tab Switch the input focus to the next region.
  • Ctrl+a Ctrl+a Toggle between the current and previous windows
  • Ctrl+a Q Close all regions but the current one.
  • Ctrl+a X Close the current region.

You can detach from the screen session at any time by typing:

Ctrl+a d

Reattach to a Linux Screen:

screen -r

To find the session ID list the current running screen sessions with:

# screen -ls

There are screens on:
    10835.pts-0.linuxize-desktop   (Detached)
    10366.pts-0.linuxize-desktop   (Detached)
2 Sockets in /run/screens/S-linuxize.

If you want to restore screen 10835.pts-0, then type the following command:

screen -r 10835

limit a process

You can easily limit CPU usage with cpulimit command like:

# cpulimit -l 10 -- /usr/bin/clamscan -r / --exclude-dir=/sys/ --quiet --infected > /var/log/clamscan/clamscan.$(date +%Y%m%d).log
linux/linux_tips.1694794395.txt.gz · Last modified: 2023/09/15 18:13 by manu