ls
: list the contents of a directorycd $dir
: change to directory$dir
cd ..
: go one directory upcd -
: go to previous directory, basically a "back button"pwd
: "print working directory" (show which directory you're in)mkdir $name
: create directory $namemv $dir $location
: move $dir to $locationcd ~
go home.cd
without a directory, go home.vi
,nano
text editors.:q
quits vim.man
the manual.sudo
do as super-user. USE AT OWN RISK.ssh
secure shell. Use to connect to servers.rm
remove a file.mkdir
make a directory.cp
copy a file or directorymv
move a file or directorygit
use Git commands.less
read a file in the command line.!!
replaced by previously run command.!1
,!2
,... go further back.cat
output a file to the command line.echo
print a message.cmd1 | cmd2
take the output ofcmd1
and put it incmd2
. Called piping.cmd > file
take the output ofcmd
and put it in a file. This replaces everything in the file.cmd >> file
appends instead of overwriting.cmd1 && cmd2
andcmd1 || cmd2
Logical operations. Docmd1
andcmd2
, orcmd1
orcmd2
.chown
take ownership of a file. Useful if you download something as root.chmod
make a file executable, among other uses.touch
create a file. More precisely, update the modification time of a file, or create it if it doesn't exist.ssh-keygen
generate a new ssh key for passwordless login on remote servers.wget
download a file from the interwebz.top
,htop
,ps -eax
display process information.which
gives the path to a command.
lolcat
pipe a command intololcat
to make the output colorful. Some commands are broken for this.cowsay
similar tololcat
, make a cow say the output.toilet
make the output in big ASCII letters. Try mixing these three together to get some interesting results.sl
make a train. A punishment to teachls
.ddate
get the day in a fictional calendar.fortune
get a random quote.neofetch
display system information with a cool logo. Looks nicer thancat /proc/cpuinfo
.cmatrix
make it rain digital rain.
WSL. Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications - directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup. This will give us access to more modern commandline interfaces on windows machines.
https://docs.microsoft.com/en-us/windows/wsl/install
If the anaconda install overwrites your bash profile, add a source command to end of ~/.bashrc
if [ -f ~/.profile ]; then
source ~/.profile
fi