Abekta

Nothing human is alien to me

User Tools

Site Tools


soft:bash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
soft:bash [2023/10/31 06:23] asadsoft:bash [2024/10/16 01:21] (current) – [Screen] asad
Line 2: Line 2:
 ^ Function ^ Code ^ ^ Function ^ Code ^
 | Check storage | ''df -h'' | | Check storage | ''df -h'' |
 +| Check storage | ''du -hs foldername'' |
 +| Physical volumes | ''pvs'' |
 +| Remove | rm -rf sth |
 | System usage monitor | ''htop'' | | System usage monitor | ''htop'' |
 | CPU information | ''lscpu'' | | CPU information | ''lscpu'' |
 | Check drives | ''lsblk'' | | Check drives | ''lsblk'' |
-| Check GPU | ''sudo lshw -C display'' |+| Check GPU | ''sudo lshw -C display'' / ''lspci grep -e VGA''
 + 
 +===== - Building from source (with python) ===== 
 +<code bash> 
 +cd software 
 +mkdir build 
 +cd build 
 +cmake -D BUILD_WITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=<install_path> .. 
 +sudo make install 
 +export LD_LIBRARY_PATH=<install_path>/lib/:$LD_LIBRARY_PATH 
 +export PYTHONPATH=<install_path>/lib/python3.11/site-packages:$PYTHONPATH 
 +</code>
  
 ===== Ports ===== ===== Ports =====
Line 20: Line 34:
  
 ===== Screen ===== ===== Screen =====
-<code> +  * Create a screen: ''screen -S name'' 
-screen -S name +  * Detach from the screen with keyboard shortcut: ''ctrl+a d'' 
-screen -ls +  * See list of screens: ''screen -ls'' 
-screen -d -r name +  * Attach to the desired screen: ''screen -r name'' 
-</code> +  * Detach from outside (not needed usually)''screen -d -r name''
- +
-Detach screen from another ssh shell: ''screen -d -r'' +
- +
-Keyboard shortcuts: +
-  * ''ctrl+a d'': leaving a screen without terminating +
-  * ''exit'': to terminate a screen+
  
 ===== Server ===== ===== Server =====
Line 45: Line 53:
  
 ==== Users and Groups ==== ==== Users and Groups ====
 +| Check permissions of a folder | ''ls -ld foldername'' |
 +| See all users of a group | ''grep groupname /etc/group'' |
 +| Give a user write permission to a folder using acl | ''setfacl -m u:username:rwx foldername'' |
 +| Change owner group of a folder | ''chown -R :groupname foldername'' |
 +| Change owner user of a folder | ''chown username: foldername'' |
 +| Change permissions of a folder | ''chmod -R u+w foldername'' / ''chmod -R 770 foldername'' |
 +
 <code> <code>
 sudo adduser username sudo adduser username
Line 54: Line 69:
 getent group getent group
 </code> </code>
 +
 ===== Storage ===== ===== Storage =====
 <code> <code>
Line 59: Line 75:
 </code> </code>
  
 +===== GPU =====
 +<code bash>
 +sudo apt autoremove nvidia* --purge
 +sudo /usr/bin/nvidia-uninstall
 +sudo /usr/local/cuda-X.Y/bin/cuda-uninstall
 +sudo apt update
 +sudo apt upgrade
 +lspci | grep -e VGA
 +ubuntu-drivers devices
 +sudo ubuntu-drivers autoinstall
 +reboot
 +nvidia-smi
 +</code>
 +
 +===== IP setting =====
 +<code bash>
 +ip link
 +sudo nano /etc/netplan/*.yaml
 +</code>
 +
 +Create the yaml file the following way:
 +<code bash>
 +# This is the network config written by 'subiquity'
 +network:
 +  version: 2
 +  renderer: networkd
 +  ethernets:
 +    eno1:
 +      dhcp4: no
 +      addresses: [10.50.255.33/27]
 +      gateway4: 10.50.255.62
 +      nameservers:
 +          addresses: [8.8.8.8]
 +    eno2:
 +      dhcp4: no
 +  version: 2
 +</code>
soft/bash.1698754992.txt.gz · Last modified: by asad

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki