2 min read

Linux Tips

Linux Tips
Photo by Gabriel Heinzer / Unsplash

How I learned linux and got good at it. There is no better way to learn how to linux than linuxing! So I took my wife's old notebook and installed ubuntu on it, plugged it into my second monitor and boom sometimes I am on my macbook with two monitors, sometimes ubuntu sometimes both.

In addition to that I took a class, but to be honest I spent most of the class time just playing with ubuntu. I think the most important thing the class offered was a remote server.... you see.... while linux makes a great desktop it is meant to run on a server, so if you do not have a remote server head over to cloudron get started!

Usefull commands in Linux.

ls  <This is the command to list all the files in a directory.>
ls - a <the -a lists all files in the directory>
ls -l filename.txt <is like show details in finder>

file <Awesome command will identify a file type>
file ls <will tell you that "ls" is a 64bit linux standard binary.>

cd <will take you back to your home directory>
cd .. <will take you down one directory>
cd / <will take you to the root directory and \bin\marklar will take you there!>
cd $HOME/marklar <intersting, it unwraps the variable home and appends it>

pwd <displays the full path name, fully qualified path name, absolute pathname>
pwd $HOME <displays the full path of $HOME>

which <which will tell the location of a system command>
<commands could be stored in many places, like /etc, /bin, /usr/bin, /usr/local/bin, and /sbin (system admin commands)  are all standard locations>

pwd <displays the full path name, fully qualified path name, absolute pathname>

cal  <displays the date>

man man <talks about the command called man>
man cal <tells you how to use cal>
man -k pwd <all the different man pages about pwd>
man -2 pwd <gives you alternate man page>

¡¡¡MAGIC!!!
You can use this symbol (without quotes) to populate a file with data ">" \>
uname > marklar.txt <puts uname output txt into the marklar file>

vi <gets it's own post... but use ESC :Q! to exit. >

head filename <will display the first 10 lines of a file>
tail filename filename <will display the last 10 lines of both files>

cat <concactinate - so originally this would combine two files. >
cat file1 file2 > destination file <combines both these files into one>
cat file1 <just prints the contents of that file to the screen>

pbcopy <copies the output to the clipboard so you can paste it>
pbcopy cat ssh.pub <copies your public key so you can paste it on github>



cat <