Lnx Flashcards
How to list all packages installed in ubuntu?
dpkg –list
How to un-install a package in ubuntu?
first check out the exact name of the packgae with the command,
dpkg –list
dpkg –list | grep cde
Make sure it does not appear in dpkg –list
Remove exact package name
sudo apt-get remove exact_pkg_name
Purge any related code
sudo apt-get purge exact_pkg_name
Then Autoremove
sudo apt-get autoremove
Finally, do a clean to check everything is correctly removed.
sudo apt-get clean
Linux: What is sshpass command?
Find out about it.
Linux: How to run a command on a remote machine.
Use ssh,
ssh laeeq@192.168.0.49 ls /tmp
ssh laeeq@192.168.0.49 date
you may have to give absolute path of the command you want to execute.
Linux: How to find state of a port (3000)?
sudo lsof -i:9950 # Linux
netstat -an | grep 9550 # Linux
netstat -an | find /I “9550” # Windows
What is tcpdump command to get traffic to/from port 3000
sudo tcpdump -i any port 3000
Raspberry pie: What to do if keyboard does not type right characters?
setxkbmap –layout us
Raspberry pie: how to install nodejs on it?
wget
http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
vimdiff: what are commands?
CTL-ww swhitches windows
do: diff obtain, get difference from other window
dp: diff put: send difference to other window
]c: go to next diff
[c: go to previous diff
zo: open zip
zc: close zip
Raspberry pie: How to clone a card
Both cards should be equal size and make?
On a linux machine, insert master card, find its device name,
sudo fdisk -l
say it is /dev/sdb
create card image,
create card image,
sudo dd if=/dev/sdb | gzip > /tmp/image_name.gz
burn, image on other card, put other card on linux PC,
sudo gzip -dc /tmp/image_name.gz | sudo dd bs=4M of=/dev/sdb
Name some popular virtualization providers.
VMware & VirtualBox (By Oracle)
What is new command to find IP address in place of ifconfig?
ip
ip address
man ip
Ubuntu: How to find which package provides a file?
dpkg -S /bin/ls
coreutils: /bin/ls
Linux: how to force core file generation from a crashing program.
ulimit -c unlimited
Linux: how to display current resource limits for a user?
ulimit -a
Linux: How to list out all break points set in a program (gdb)?
info breakpoints. Each break point is given a number.
To delete a brk pt,
delete 3