Home Server

De RJGS
Revisão de 00h22min de 11 de abril de 2026 por 192.168.0.10 (discussão) (Criou página com '== sudoers == sudo vim /etc/sudoers Conteúdo <pre> # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" # This fixes CVE-2005-4890 a...')
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)

sudoers

[editar]
sudo vim /etc/sudoers

Conteúdo

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# This fixes CVE-2005-4890 and possibly breaks some versions of kdesu
# (#1011624, https://bugs.kde.org/show_bug.cgi?id=452532)
Defaults        use_pty

# This preserves proxy settings from user environments of root
# equivalent users (group sudo)
#Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"

# This allows running arbitrary commands, but so does ALL, and it means
# different sudoers have their choice of editor respected.
#Defaults:%sudo env_keep += "EDITOR"

# Completely harmless preservation of a user preference.
#Defaults:%sudo env_keep += "GREP_COLOR"

# While you shouldn't normally run git as root, you need to with etckeeper
#Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"

# Per-user preferences; root won't have sensible values for them.
#Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"

# "sudo scp" or "sudo rsync" should be able to use your SSH agent.
#Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"

# Ditto for GPG agent
#Defaults:%sudo env_keep += "GPG_AGENT_INFO"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "@include" directives:

@includedir /etc/sudoers.d

hostname

[editar]
sudo vim /etc/hostname

Conteúdo

rjgs

timezone

[editar]
sudo vim /etc/timezone

Conteúdo

America/Sao_Paulo

networks

[editar]
sudo vim /etc/networks

Conteúdo

# symbolic names for networks, see networks(5) for more information
link-local 169.254.0.0

hosts

[editar]
sudo vim /etc/hosts

Conteúdo

127.0.0.1 localhost
127.0.1.1 rjgs

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

issue

[editar]
sudo vim /etc/issue

Conteúdo


 --------------------------------
##################################

  # # # # # ATENÇÃO # # # # #

  Você está prestes a acessar

     este servidor por ssh.

        TE LIGA, TCHE!!!

   tá sendo tudo registrado.

  bota a senha aí e boa sorte!

##################################
 -------------------------------

issue.net

[editar]
sudo vim /etc/issue.net

Conteúdo

 --------------------------------
##################################

  # # # # # ATENÇÃO # # # # #

  Você está prestes a acessar

     este servidor por ssh.

        TE LIGA, TCHE!!!

   tá sendo tudo registrado.

  bota a senha aí e boa sorte!

##################################
 -------------------------------

motd

[editar]
sudo vim /etc/motd

Conteúdo

 ________________________
==========================

  Você acabou de acessar
<pre>
        o servidor

  ____     _  ____ ____
 |  _ \   | |/ ___/ ___|
 | |_) |  | | |  _\___ \
 |  _ < |_| | |_| |___) |
 |_| \_\___/ \____|____/

     Servidor Ubuntu
    IP: 192.168.0.100

Te deita, mas nao te tapa!

      VAI, DIANHO!!!

==========================
 ------------------------

group

[editar]
sudo vim /etc/group

Conteúdo

root:x:0:rjgs
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,rjgs
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:rjgs
floppy:x:25:
tape:x:26:
sudo:x:27:rjgs
audio:x:29:pulse
dip:x:30:rjgs
www-data:x:33:rjgs
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
shadow:x:42:
utmp:x:43:
video:x:44:emby
sasl:x:45:
plugdev:x:46:rjgs
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:999:
systemd-network:x:998:
systemd-timesync:x:997:
input:x:996:
sgx:x:995:
kvm:x:994:
render:x:993:emby
lxd:x:101:rjgs
messagebus:x:102:
systemd-resolve:x:992:
_ssh:x:103:
polkitd:x:991:
crontab:x:990:
syslog:x:104:
uuidd:x:105:
rdma:x:106:
tcpdump:x:107:
tss:x:108:
landscape:x:109:
fwupd-refresh:x:989:
rjgs:x:1000:
rtkit:x:110:
ssl-cert:x:111:
lightdm:x:112:
nopasswdlogin:x:113:
whoopsie:x:114:
netdev:x:115:
bluetooth:x:116:
scanner:x:117:saned
avahi:x:118:
saned:x:119:
colord:x:120:
lpadmin:x:121:
pulse:x:122:
pulse-access:x:123:
pipewire:x:124:
emby:x:988:
mysql:x:125:
sambashare:x:987:
winbindd_priv:x:986:

crontab

[editar]
sudo vim /etc/crontab

Conteúdo

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
# You can also override PATH, but by default, newer versions inherit it from the environment
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; }
47 6    * * 7   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.weekly; }
52 6    1 * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.monthly; }
#

.bash_history

[editar]
sudo vim /home/rjgs/.bash_history

Conteúdo

sudo apt update
sudo apt upgrade
sudo apt search xubuntu
sudo apt install xubuntu-desktop-minimal
sudo reboot now
sudo apt update
sudo apt upgrade
ls
./rjgs_script_vnc_2.0.sh
sudo apt install firefox
sudo dpkg --configure -a
sudo apt install firefox
sudo apt install gnome-disk-utility
firefox
sudo apt install firefox
sudo apt install transmission
exit
transmission
echo "magnet:?xt=urn:btih:7772e3b4024709d5aab3290e17b9d79eb5f25c87&dn=HIDRATORRENTS.ORG..MKV.Uma.Batalha.Ap%C3%B3s.a.Outra.2025.1080p.WEB-DL.DUAL.5.1&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce" >> torrents.txt
echo "magnet:?xt=urn:btih:7772e3b4024709d5aab3290e17b9d79eb5f25c87&dn=HIDRATORRENTS.ORG..MKV.Uma.Batalha.Ap%C3%B3s.a.Outra.2025.1080p.WEB-DL.DUAL.5.1&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce" >> torrentss.txt
sudo apt update
sudo apt upgrade
top
sudo apt install apache2
ls /var/www/
sudo adduser rjgs www-data
sudo adduser rjgs root
sudo adduser rjgs sudo
mkdir /var/www/robisonjoel/
sudo mkdir /var/www/robisonjoel/
sudo mkdir /var/www/robisonjoel/wiki
sudo chmod -R 775 /var/www/
sudo apt search php
sudo apt install php
sudo su
sudo apt update
sudo a2enmod ssl
sudo systemctl restart apache2
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
cd /etc/apache2/sites-available/
ls
vim 000-default.conf
sudo vim default-ssl.conf
sudo systemctl restart apache2
sudo en2site default-ssl.conf
sudo en2esite default-ssl.conf
sudo a2esite default-ssl.conf
sudo a2ensite default-ssl.conf
sudo systemctl restart apache2
sudo systemctl reload apache2
sudo apache2ctl configtest
sudo apt update
sudo apt install gedit
sudo apt search  gedit
sudo apt install  gedit
gedit
apt search gedit > aptgedit.txt
gadit aptgedit.txt
gedit aptgedit.txt
sudo apt upgrade
systemctl restart lightdm.service
sudo su
sudo au
sudo su
sudo apt search samba
sudo apt install 4pane/noble 8.0-1build4 amd64 -y #_gerenciador de arquivos em quatro painéis com lista detalhada
sudo apt install gnome-system-tools/noble 3.0.0-9.1ubuntu4 amd64 -y #_utilitários de configuração multiplataforma
sudo apt install registry-tools/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_ferramentas para visualizar e manipular o registro do Windows
sudo apt install samba/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_servidor de arquivos, impressão e login SMB/CIFS para Unix
sudo apt install samba-common/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 all -y #_arquivos comuns usados tanto pelo servidor quanto pelo cliente Samba
sudo apt install samba-common-bin/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_arquivos comuns do Samba usados pelo servidor e pelo cliente
sudo apt install samba-testsuite/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_suíte de testes do Samba
sudo apt install samba-vfs-modules/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_plugins de Sistema de Arquivos Virtual do Samba
sudo apt install samba-vfs-modules-extra/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_módulos extras de Sistema de Arquivos Virtual do Samba
sudo apt install smb2www/noble 980804-45 all -y #_cliente de rede SMB/CIFS com interface web
sudo apt install smbclient/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 -y #_clientes SMB/CIFS em linha de comando para Unix
sudo apt install 4pane -y #_gerenciador de arquivos em quatro painéis com lista detalhada
sudo apt install gnome-system-tools -y #_utilitários de configuração multiplataforma
sudo apt install registry-tools -y #_ferramentas para visualizar e manipular o registro do Windows
sudo apt install samba -y #_servidor de arquivos, impressão e login SMB/CIFS para Unix
sudo apt install samba-common -y #_arquivos comuns usados tanto pelo servidor quanto pelo cliente Samba
sudo apt install samba-common-bin -y #_arquivos comuns do Samba usados pelo servidor e pelo cliente
sudo apt install samba-testsuite -y #_suíte de testes do Samba
sudo apt install samba-vfs-modules -y #_plugins de Sistema de Arquivos Virtual do Samba
sudo apt install samba-vfs-modules-extra -y #_módulos extras de Sistema de Arquivos Virtual do Samba
sudo apt install smb2www -y #_cliente de rede SMB/CIFS com interface web
sudo apt install smbclient -y #_clientes SMB/CIFS em linha de comando para Unix
sudo vim /etc/samba/smb.conf
sudo systemctl restart smbd
sudo smbpasswd -a rjgs
ls -lha
sudo chmod -R 777 *
sudo chmod -R 777 *.*
ls -lha
sudo rm emby-server-deb_4.9.3.0_amd64.deb
sudo rm gedit_optinos.txt
sudo rm LocalSettings.php
sudo rm mediawiki-1.45.1
sudo rm -r mediawiki-1.45.1
sudo rm -r my_wiki_2026-02-10_15-07-52.sql
sudo rm -r torrents.txt
sudo su
sudo systemctl restart smbf
sudo systemctl restart smbd
cat /etc/samba/smb.conf
sudo vim /etc/samba/smb.conf
sudo systemctl restart smbd
sudo cp -rv /mnt/HD/backup_server/NextCloud/rjgs/files/* /home/rjgs/NextCloud
mkdir /home/rjgs/NextCloud
sudo cp -rv /mnt/HD/backup_server/NextCloud/rjgs/files/* /home/rjgs/NextCloud
ls -lha NextCloud/
sudo chown -R rjgs:rjgs NextCloud/*
cd /mnt/HD/
ls
cd /mnt/HD/backup_server/
ls
ls -lha
sudo chown -R rjgs:rjgs /mnt/HD/backup_server/
sudo chown -R rjgs:rjgs /mnt/HD/backup_server/ARRUMAR/
sudo chown -R rjgs:rjgs /mnt/HD/backup_server/ARRUMAR/*
sudo apt update
sudo apt upgrade
systemctl restart lightdm.service
sudo su
sudo ./rjgs_script_vnc_2.0.sh
sudo cp /mnt/HD/backup_server/ARRUMAR /home/rjgs/
sudo cp -rv /mnt/HD/backup_server/ARRUMAR /home/rjgs/
cat /etc/timezone
sudo vim /etc/timezone
cat rjgs_script_vnc_2.0.sh
ls -lha /etc/
sudo vim /etc/motd
sudo vim .ssh/
ls .ssh/
ls -lha .ssh/
ls -lha /etc/ssh/
sudo vim /etc/motd
sudo systemctl restart sshd
sudo systemctl restart ssh
exit
ls -lha /etc/
sudo vim /etc/issue
sudo systemctl restart ssh
sudo vim /etc/issue.net
sudo systemctl restart ssh
exit
cat /etc/issue
cat /etc/issue.net
sudo vim /etc/ssh/sshd_config
sudo service ssh restart
exit
sudo apt update
sudo apt upgrade
tree
sudo apt  install tree  # version 2.1.1-2ubuntu3.24.04.2
tree
tree -h
tree --help
man tree
cd oracle/
ls
sudo su
sudo rm -rf ARRUMAR/EDIT/samba-4.23.4/
sudo vim /etc/crontab
sudo vim .bashrc
source .bashrc
alert
alert cuidado
cat .bashrc
ls .ssh
ssh-key
ssh-keygen -t rsa
cat .ssh/id_rsa
cat .ssh/id_rsa.pub
exit
sudo su
exit
cd oracle/
ls
ssh -i ssh-key-2023-04-18.key [email protected]
sudo su
free
sudo su
sudo ./rjgs_script_vnc_2.0.sh
tree .ssh
sudo su
exit
sudo su
sudo apt install libapache2-mod-php
php -v
sudo apt install libapache2-mod-php8.3
sudo apt install php8.3
sudo apt install libapache2-mod-php-gd
sudo apt install php8.3-gg
sudo apt install php3.8-gd
sudo apt install php-gd
sudo apt install php8.3-mysql
apt install php8.3-curl -y
apt install php8.3-curl
apt install php-curl
sudo apt install php8.3-curl
sudo apt install php8.3-mbstring
sudo apt install php8.3-intl
sudo apt install php8.3-gmp
sudo apt install php8.3-bcmath
sudo apt install php-imagick
sudo apt install php8.3-xml
sudo apt install php8.3-zip
sudo mysql -u root -p
sudo mkdir .nextcloud/
cd .nextcloud/
sudo wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
sudo unzip latest.zip
ls -lha nextcloud/
sudo mkdir -a /var/www/robisonjoel/drive/ && sudo cp -vur nextcloud/* /var/www/robisonjoel/drive/
sudo mkdir /var/www/robisonjoel/drive/ && sudo cp -vur nextcloud/* /var/www/robisonjoel/drive/
chown -R www-data:www-data /var/www/robisonjoel/drive/config/
sudo chown -R www-data:www-data /var/www/robisonjoel/drive/config/
sudo chown -R www-data:www-data /var/www/robisonjoel/drive/
sudo chmod -R 770 /var/www/robisonjoel/drive/config/
sudo chmod -R 775 /var/www/robisonjoel/drive/
cd ..
ls
sudo mkdir drive
sudo chown -R www-data:www-data /home/rjgs/drive
mysql -u rjgs -p
rdesktop 10.222.0.82 -u trust -p janela
sudo apt install rdesktop
rdesktop 10.222.0.82 -u trust -p janela
rdesktop 10.222.0.82
ls -lha

.bashrc

[editar]
sudo vim /home/rjgs/.bashrc

Conteúdo

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
        # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
    else
        color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

### ALIAS DE ATUALIZAÇÕES
alias atualiza='sudo apt update ; sudo apt upgrade -y ; sudo snap refresh ; sudo apt autoremove ; sudo apt clean'
# alias upd_chrome='sudo chmod +x Downloads/google-chrome*.deb ; sudo dpkg -i Downloads/google-chrome*.deb ; sudo apt install -f -y ; sudo rm Downloads/google-chrome*.deb'
# alias upd_discord='sudo chmod +x discord*.deb ; sudo dpkg -i discord*.deb ; sudo apt install -f ; sudo rm discord*.deb'
alias upd='sudo apt update'
alias upd='sudo apt upgrade -y'
alias updg='sudo apt update ; sudo apt upgrade -y ; sudo snap refresh'
alias meuip='curl ifconfig.me'

### ALIAS DE LIMPEZA
alias limps='sudo apt autoremove -y ; sudo apt clean'

### ALIAS DE LISTAGEM
# alias l='ls -CF'
# alias la='ls -A'
alias ll='ls -lha'

### ALIAS QUE ACESSA MEU WINDOWS POR RDESKTOP
# alias janela='nohup rdesktop 10.222.0.82 -u trust -p janela &'
# alias ruindows="nohup rdesktop -u trust -p janela -x lan -N -T \"JANELAS - Robison - 4Trust\" 10.222.0.81:4040 >/dev/null 2>&1 &"

### FERRAMENTAS
alias calcule='bc --quiet'
# alias dio='nohup diodon &'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

rjgs_script_vnc_2.0.sh

[editar]
sudo vim /home/rjgs/rjgs_script_vnc_2.0.sh

Conteúdo

#!/bin/bash

echo "################################"
echo "### INICIANDO O SERVIDOR VNC ###"
echo "################################"
echo " "
################################
### Declaração de Variáveis
VNC_IP="$(hostname -I | awk '{print $1}')"
################################

################################
### Verificação e instalação do VNC

# Verifica se o x11vnc está instalado
if ! command -v x11vnc >/dev/null 2>&1; then
    echo "x11vnc não está instalado. Instalando..."

    # Atualiza repositórios (opcional, mas recomendado)
    sudo apt update

    # Instala o x11vnc
    sudo apt install -y x11vnc

    echo "x11vnc instalado com sucesso!"
else
echo " "
echo "### Insira a Senha do acesso VNC Client:"
echo " "
read VNC_SENHA
#
sudo x11vnc -storepasswd $VNC_SENHA /etc/x11vnc.pass
#
echo " "
echo "### Iniciando o servidor VNC"
echo " "
#
sudo x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log
fi
sleep 5
#
echo " "
echo "#################################################"
echo "### Seu servidor de VNC está instalado e rodando."
echo "### Para acessar esse computador:                "
echo "### IP...: $VNC_IP                               "
echo "### Porta: 5900                                  "
echo "### Senha: $VNC_SENHA                            "
echo "#################################################"
echo " "

Programas

[editar]
== Pacotes para instalar ==
sudo apt install 7zip
sudo apt install apache2-bin
sudo apt install apache2-data
sudo apt install apache2-doc
sudo apt install apache2-utils
sudo apt install apache2
sudo apt install bb
sudo apt install bc
sudo apt install bzip2
sudo apt install cmatrix
sudo apt install cron
sudo apt install cups-browsed
sudo apt install cups-bsd
sudo apt install cups-client
sudo apt install cups-common
sudo apt install cups-core-drivers
sudo apt install cups-daemon
sudo apt install cups-filters-core-drivers
sudo apt install cups-filters
sudo apt install cups-ipp-utils
sudo apt install cups-pk-helper
sudo apt install cups-ppdc
sudo apt install cups-server-common
sudo apt install cups
sudo apt install curl
sudo apt install eject
sudo apt install ethtool
sudo apt install fdisk
sudo apt install figlet
sudo apt install firefox
sudo apt install flatpak
sudo apt install font-manager-common
sudo apt install font-manager
sudo apt install font-viewer
sudo apt install fonts-crosextra-caladea
sudo apt install fonts-crosextra-carlito
sudo apt install fonts-dejavu-core
sudo apt install fonts-dejavu-extra
sudo apt install fonts-dejavu-mono
sudo apt install fonts-droid-fallback
sudo apt install fonts-freefont-ttf
sudo apt install fonts-liberation-sans-narrow
sudo apt install fonts-liberation
sudo apt install fonts-noto-cjk
sudo apt install fonts-noto-color-emoji
sudo apt install fonts-noto-core
sudo apt install fonts-noto-hinted
sudo apt install fonts-noto-mono
sudo apt install fonts-noto-ui-core
sudo apt install fonts-opensymbol
sudo apt install fonts-symbola
sudo apt install fonts-ubuntu
sudo apt install fonts-urw-base35
sudo apt install ftp
sudo apt install fuse3
sudo apt install gdisk
sudo apt install gedit-common
sudo apt install gedit
sudo apt install gnome-accessibility-themes
sudo apt install gnome-bluetooth-3-common
sudo apt install gnome-bluetooth-sendto
sudo apt install gnome-control-center-data
sudo apt install gnome-control-center-faces
sudo apt install gnome-control-center
sudo apt install gnome-desktop3-data
sudo apt install gnome-disk-utility
sudo apt install gnome-menus
sudo apt install gnome-online-accounts-gtk
sudo apt install gnome-online-accounts
sudo apt install gnome-remote-desktop
sudo apt install gnome-session-bin
sudo apt install gnome-session-common
sudo apt install gnome-settings-daemon-common
sudo apt install gnome-settings-daemon
sudo apt install gnome-shell-common
sudo apt install gnome-shell
sudo apt install gnome-software-common
sudo apt install gnome-software-plugin-flatpak
sudo apt install gnome-software-plugin-snap
sudo apt install gnome-software
sudo apt install gnome-startup-applications
sudo apt install gnome-themes-extra-data
sudo apt install gnome-themes-extra
sudo apt install gnome-user-docs-pt
sudo apt install gnome-user-docs
sudo apt install greybird-gtk-theme
sudo apt install grub-common
sudo apt install grub-gfxpayload-lists
sudo apt install grub-pc-bin
sudo apt install grub-pc
sudo apt install grub2-common
sudo apt install gvfs-backends
sudo apt install gvfs-common
sudo apt install gvfs-daemons
sudo apt install gvfs-fuse
sudo apt install gvfs-libs
sudo apt install gvfs
sudo apt install gzip
sudo apt install hdparm
sudo apt install hollywood
sudo apt install hostname
sudo apt install hplip-data
sudo apt install hplip
sudo apt install htop
sudo apt install humanity-icon-theme
sudo apt install hunspell-en-us
sudo apt install hunspell-pt-br
sudo apt install hunspell-pt-pt
sudo apt install imagemagick-6-common
sudo apt install imagemagick-6.q16
sudo apt install imagemagick
sudo apt install inetutils-telnet
sudo apt install language-pack-gnome-pt-base
sudo apt install language-pack-gnome-pt
sudo apt install language-pack-pt-base
sudo apt install language-pack-pt
sudo apt install language-selector-common
sudo apt install language-selector-gnome
sudo apt install lightdm-gtk-greeter
sudo apt install lightdm
sudo apt install locales
sudo apt install manpages
sudo apt install nautilus-data
sudo apt install nautilus-dropbox
sudo apt install nautilus
sudo apt install net-tools
sudo apt install netcat-openbsd
sudo apt install network-manager-gnome
sudo apt install network-manager-pptp
sudo apt install network-manager
sudo apt install networkd-dispatcher
sudo apt install nftables
sudo apt install ntfs-3g
sudo apt install openssh-client
sudo apt install openssh-server
sudo apt install openssh-sftp-server
sudo apt install p7zip-full
sudo apt install parted
sudo apt install printer-driver-brlaser
sudo apt install printer-driver-c2esp
sudo apt install printer-driver-foo2zjs-common
sudo apt install printer-driver-foo2zjs
sudo apt install printer-driver-hpcups
sudo apt install printer-driver-m2300w
sudo apt install printer-driver-min12xxw
sudo apt install printer-driver-pnm2ppa
sudo apt install printer-driver-postscript-hp
sudo apt install printer-driver-ptouch
sudo apt install printer-driver-pxljr
sudo apt install printer-driver-sag-gdi
sudo apt install printer-driver-splix
sudo apt install pulseaudio-utils
sudo apt install rsync
sudo apt install samba-common-bin
sudo apt install samba-common
sudo apt install samba-dsdb-modules
sudo apt install samba-libs
sudo apt install samba-testsuite
sudo apt install samba-vfs-modules
sudo apt install samba
sudo apt install skanlite
sudo apt install snapd
sudo apt install software-properties-common
sudo apt install software-properties-gtk
sudo apt install sudo
sudo apt install synaptic
sudo apt install tar
sudo apt install tcpdump
sudo apt install telnet
sudo apt install tightvncpasswd
sudo apt install toilet-fonts
sudo apt install toilet
sudo apt install transmission-common
sudo apt install transmission-gtk
sudo apt install transmission
sudo apt install tree
sudo apt install tzdata
sudo apt install ubuntu-advantage-desktop-daemon
sudo apt install ubuntu-drivers-common
sudo apt install unrar
sudo apt install unzip
sudo apt install vim-common
sudo apt install vim-runtime
sudo apt install vim-tiny
sudo apt install vim
sudo apt install vlc-bin
sudo apt install vlc-data
sudo apt install vlc-l10n
sudo apt install vlc-plugin-access-extra
sudo apt install vlc-plugin-base
sudo apt install vlc-plugin-notify
sudo apt install vlc-plugin-qt
sudo apt install vlc-plugin-samba
sudo apt install vlc-plugin-skins2
sudo apt install vlc-plugin-video-output
sudo apt install vlc-plugin-video-splitter
sudo apt install vlc-plugin-visualization
sudo apt install wget
sudo apt install whoopsie
sudo apt install xtightvncviewer
sudo apt install zip