• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

command line

Editors on Terminal

August 25, 2022

How to run editors from the Terminal.

Sublime, Visual Studio Code, Atom and Bluefish examples.

Open from the current directory.

subl .
code .
atom .
bluefish .

subl . code . atom . bluefish .

Open editor using path and file.

subl /etc/hosts
code /etc/hosts
atom /etc/hosts
bluefish /etc/hosts

subl /etc/hosts code /etc/hosts atom /etc/hosts bluefish /etc/hosts

Filed Under: Linux Tagged With: atom, bluefish, command line, editors, sublime, terminal, visual studio

Linux Format USB Drive

July 9, 2020

Here’s how to format a USB drive on Linux.

Plug in the USB drive to see mount point.

# scan for all drives
df -Th
Filesystem     Type     Size  Used Avail Use% Mounted on
/dev/sdc1      fuseblk   30G   66M   30G   1% /media/ulysses/451B99AF225B48EC

# scan for all drives df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/sdc1 fuseblk 30G 66M 30G 1% /media/ulysses/451B99AF225B48EC

Unmount USB drive.

umount /dev/sdc1

umount /dev/sdc1

Choose a file system type and run the appropriate format command.

# nfts format
mkfs.ntfs /dev/sdc1
# vfat format
mkfs.vfat /dev/sdc1
# ext4 format
mkfs.ext4 /dev/sdc1

# nfts format mkfs.ntfs /dev/sdc1 # vfat format mkfs.vfat /dev/sdc1 # ext4 format mkfs.ext4 /dev/sdc1

Filed Under: Linux Tagged With: 3.0, command line, format, mount, terminal, usb

Printing From A Terminal

July 7, 2020

There are times you just want to print directly from the command line.

# check your printing options
lpotions
lpinfo -v
# what's your default printer
lpinfo -p -d
# use lp to print
lp notes.txt
# use -n print multiple copies
lp -n 2 notes.txt
# check the printer queue
lp -q
# use the job number to cancel print jobs if needed
cancel 123

# check your printing options lpotions lpinfo -v # what's your default printer lpinfo -p -d # use lp to print lp notes.txt # use -n print multiple copies lp -n 2 notes.txt # check the printer queue lp -q # use the job number to cancel print jobs if needed cancel 123

Filed Under: Linux Tagged With: cancel, command line, cups, linux, print, queue

Linux Mint 20 Ulyana

July 6, 2020

I upgraded my desktop to Linux Mint 20 Ulyana over the weekend.

Edit your package repository. Replace tricia with ulyana, and bionic with focal.

vim /etc/apt/sources.list.d/official-package-repositories.list

vim /etc/apt/sources.list.d/official-package-repositories.list

Run update first.

apt update -y
apt upgrade -y

apt update -y apt upgrade -y

Perform upgrade to Linux Mint 20. When prompted, choose default.

apt dist-upgrade

apt dist-upgrade

Reboot.

reboot

reboot

cat /etc/os-release.

ulysses@penguin:~/Code$ cat /etc/os-release
NAME="Linux Mint"
VERSION="20 (Ulyana)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20"
VERSION_ID="20"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=ulyana
UBUNTU_CODENAME=focal

ulysses@penguin:~/Code$ cat /etc/os-release NAME="Linux Mint" VERSION="20 (Ulyana)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20" VERSION_ID="20" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.ubuntu.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=ulyana UBUNTU_CODENAME=focal

Filed Under: Linux Tagged With: command line, linux mint, linux mint 20, ulyana, upgrade

SFTP Login

July 8, 2019

How to login using SFTP on a non-standard port.

sftp -oPort=2233 username@servername

sftp -oPort=2233 username@servername

Get list of commands.

sftp help

sftp help

Filed Under: Linux Tagged With: authentication, cli, command line, different, login, port, sftp

  • Go to page 1
  • Go to page 2
  • Go to Next Page »
  • Home
  • About
  • Search

Copyright © 2023