Skip to content

Latest commit

 

History

History
179 lines (120 loc) · 3.62 KB

README.md

File metadata and controls

179 lines (120 loc) · 3.62 KB

Linux setup (Ubuntu)

Keep system packages up to date

sudo apt update
sudo apt upgrade -y
sudo apt autoremove --purge -y

Linux utility

Configure Password-Based SSH Authentication

  • Edit the /etc/ssh/sshd_config and add the following line:

    PasswordAuthentication yes
  • Restart the SSH server for the new configuration to take effect:

    sudo /etc/init.d/ssh force-reload

Execute sudo without Password

  • Open terminal and type:

    sudo visudo
  • At the bottom of the file, add the following line:

    <username> ALL=(ALL) NOPASSWD: ALL

Interesting packages in Linux

### cool apps
sudo apt install neofetch hollywood cmatrix jp2a speedtest-cli thefuck -y

nvtop stands for Nvidia TOP, a (h)top like task manager for NVIDIA GPUs. It can handle multi-GPUs and print information about them in a htop familiar way.

git clone https://github.com/Syllo/nvtop.git
sudo apt install cmake libncurses5-dev libncursesw5-dev git -y
mkdir -p nvtop/build && cd nvtop/build && cmake ..
make && sudo make install

Download a large file from Google Drive.

pip install gdown

See usage in this doc.

ascii-image-converter is a command-line tool that converts images into ASCII art and prints them out onto the console.

ascii-image-converter XXX.png --color

jp2a is a simple JPEG to ASCII converter.

Command line interface for testing internet bandwidth using speedtest.net

speedtest

Add rainbow to your command line.


## [ntfy](https://github.com/dschep/ntfy)

ntfy brings desktop notification from your shell.

[Linux Desktop Notifications](https://github.com/dschep/ntfy#linux-desktop-notifications---linux)

```sh
$ sudo apt install python-dbus # on ubuntu/debian

Quick start

$ sudo pip install ntfy
$ ntfy send test
# send a notification when the command `sleep 10` finishes
# this sends the message '"sleep 10" succeeded in 0:10 minutes'
$ ntfy done sleep 10
$ ntfy -b pushover -o user_key t0k3n send 'Pushover test!'
$ ntfy -t 'ntfy' send "Here's a custom notification title!"
$ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntfy.yml
$ ntfy send "Pushover via config file!"
$ ntfy done --pid 6379  # pid extra
$ ntfy send ":tada: ntfy supports emoji! :100:"  # emoji extra
# Enable shell integration
$ echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc

Frequently-used apt commands

  • Remove package:

    # Keep configuration file
    sudo apt-get remove vsftpd
  • Remove package & configuration file:

    # Remove configuration file
    sudo apt-get purge vsftpd

    or

    sudo apt-get remove --purge texlive-full
  • Remove unused dependencies

    sudo apt autoremove
  • Remove all package files(installation files/ *.deb)

    sudo apt clean
  • Remove package files which is not installed in PC

    sudo apt autoclean
  • If some packages got autoremoved/removed, yet haven't purged, use dpkg to list it.

    dpkg -l | grep ^rc
    • ^rc means remove but no purge.
  • Combine with grep+awk.

    sudo apt-get purge `dpkg -l | grep ^rc | awk '{ print $2 }'`