Command Line Interface Flashcards
my computer’s network name
hostname
make directory
mkdir
change directory
cd
list directory
ls
remove directory
rmdir
push directory
pushd
pop directory
popd
copy a file or directory
cp
move a file or directory
mv
page through a file
less
print the whole file
cat
execute arguments
xargs
find files
find
find things inside files
grep
read a manual page
man
find which manual page is appropriate
apropos
look at your environment
env
print some arguments
echo
export/set a new environment variable
export
exit the shell
exit
DANGER! become super user root DANGER!
sudo
To write in a file
nano
to save in nano
ctrl + O
to exit nano
ctrl + X
to exit less
Q
What are the cursor navigation prompts?
CTRL + a : Move to end
CTRL + e : Move to end
Use Up and Down arrow keys to toggle through previous commands
CTRL + u : Clears current line
CTRL + l : Clears the terminal window (does not clear history)
How to display hidden files?
ls -a
How to move files into directories?
mv + file_to_move + destination_path : Move a file or folder to a new location
mkdir + directory1 + directory2 + directory3… : Make multiple directories at once.
How to merge branches after making a commit?
git merge (branch not worked on yet)
What is rebasing?
It takes a set of commits, copies them and sets them down somewhere else.
git rebase