Debian: Difference between revisions

From Andreida
 
Line 7: Line 7:
* [[debian, dig]]
* [[debian, dig]]
* [[rename a user / change username]]
* [[rename a user / change username]]
* [[Install Java]]


= Config/Setup/Install =
= Config/Setup/Install =

Latest revision as of 21:28, 4 May 2024

Console

Config/Setup/Install

System

lsblk -f

Use a backport

(source)

upgrade Debian to the next major version

date uses wrong timezone, shows wrong format

timedatectl list-timezones | grep Berlin
timedatectl set-timezone Europe/Berlin

man date
vi ~/.bashrc
alias date="date +'%F %T'"

Other


sudo

apt-get install sudo
adduser <user> sudo
adduser andreas sudo

User andreas has to relogin for the new group to be enabled for him. To check if you are part of the group sudo use

groups

Modify sudo rights and behavior:

visudo

Set vi as editor for visudo (.bashrc of root, will not work this way for any sudo user without more work)

 export SUDO_EDITOR=`which vi`

Using sudo without password:

%sudo ALL=(ALL) NOPASSWD: ALL

Make sure to add this as last line or at least after all lines which do anything like this because otherwise the other rules will be used instead of this one.

Don't put your stuff into the regular sudo file which is shown by visudo. Instead create a file

vi /etc/sudoers.d/custom

and add content like this:

# activate this to allow all commands without password
# %sudo ALL=(ALL) NOPASSWD: ALL

# command per user which don't need a password, comma seperated
andreas ALL=(ALL) NOPASSWD: /usr/sbin/shutdown, /usr/bin/ls

top

The output of top looks uninteresting and is bad to read. This does not have to be that way. Download Media:Top-config.zip to your home directory, unzip it and hope it does not crash/destroy something in your system. I only tested this with Debian 10.

  • download to your home directory
  • unzip
  • call top
top

I just pressed '?' and tried the things they tell you there. Then I zipped the result.

install c++

sudo apt-get install build-essential manpages-dev libstdc++-8-doc

If libstdc++-8-doc does not exist, check for later versions. libstdc++-9-doc ...

Repository changes

This must be accepted explicitly before updates for this repository can be applied. See apt-secure
apt-get update --allow-releaseinfo-change


screen "press space or return to end"

.screenrc

startup_message off