Terminal

Count files in the folder:

ls | wc -l

"You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory." Fix:

sudo gem install bundler

Copy file via scp

scp archive.zip root@HOST_IP:~/Downloads

Check who is using specified port

lsof -nP -iTCP:$PORT | grep LISTEN

Change Lenovo conservation mode (requires sudo)

reading the current status:

cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

enable Conservation mode:

echo 1  >  /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

disable conservation mode:

echo 0  > /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

Last updated

Was this helpful?