Comment on page
Shell
date -d @1626647940
sudo systemctl restart network-manager
sudo gparted
nmap -sP 192.168.0.1/24
scan portsnmap -A 192.168.10.112
detect OS and servicesls -l /dev/ttyS0
groups <username>
sudo gpasswd -a <username> <groupname>
sudo gpasswd -d <username> <groupname>
sudo groupadd <newgroupname>
sudo usermod -a -G <groupname> <username>
which pip
to see whichpip
command you are running - useful for checking environment!lsusb
to check USB deviceslspci
to check PCI deviceslspci | grep VGA
to check GPUssudo lshw -C video
to check GPU display details- uncomment
#force_color_prompt=yes
in.bashrc
for a colored prompt sudo !!
where!!
is for the last commandpython3 -m site
show searching path for python3sudo python -m pip install --force-reinstall pip==8.1.1
if you inadvertently upgraded your system pip. More info can be found at this link, and this link.sudo ldconfig
aftersudo make install
to refresh the cachetar -cf filename.tar file1 folder2
packed without compressiontar -xf filename.tar
tar -cvzf filename.tar.gz file1 folder2
compress by-z
; verbose by-v
tar -xvzf filename.tar.gz
tar -xvzf filename.tar.gz -C {path}
decompress to a designated path
Ctrl + Z
to stop the process, followed bybg
to run in the background orfg
to run in the foreground.- Use command
./test.sh 1>stdout.log 2>stderr.log &
and it will return a process ID. - Processes running in the background can be monitored by
top
command.
apt-cache showpkg <pkgname>
show package info, both depends and reverse dependsapt-cache depends ros-melodic-desktop
show one-level dependenciesapt-cache rdepends --installed ros-melodic-desktop
sudo apt install apt-rdepends
apt-rdepends ros-melodic-desktop | pager
recursively show all dependenciesapt-rdepends --reverse protobuf-compiler | grep ros-melodic-desktop
dpkg -L <package-name>
apt list <package-name>
apt-cache madison
locate <filename>
find a file in database (globally)find <filename>
find a file in local directory
vi -b <filename>
open file in binary mode:%!xxd
switch to hex mode:%!xxd -r
switch back to binary mode:wq
save and exit
sudo update-alternatives --config x-terminal-emulator
ssh
to see if ssh is installed (openssh-client is installed by default)ssh-keygen
orssh-keygen -t rsa
generate ssh key by RSA algorithmcat ~/.ssh/id_rsa.pub
print public key (for settings on Github)ssh -T [email protected]
testingsudo apt-get install openssh-server
install server for incoming ssh connectionsssh-copy-id username@hostname
copy your ssh key to remote computer to avoid verifying password on every connectionssh username@ip
ssh login to a remote computer with this ip and usernamessh username@hostname
if mapped this hostname to its ip in /etc/hosts filessh -X username@hostname
login with GUI openssh -p 1234 username@hostname
login via port 1234sudo gedit /etc/hosts
modify hosts filesudo gedit /etc/ssh/sshd_config
modify ssh server configuration
Last modified 2yr ago