Linux commands Flashcards
What is a root directory?
is the directory on Unix-like operating systems that contains all other directories and files on the system and which is designated by a forward slash ( / )
What command brings you to the root directory?
cd /
What command lists the contents of the current working directory?
ls
How can you return to a users home directory?
cd ~ (tindle)
How can you print the working directory?
pwd
What is an absoloute path?
also referred to as an absolute path or a full path, is the location of a file or directory relative to the root directory
What is a relative pathname?
contrasts with an absolute pathname in that it tells the location of a file or directory relative to the current directory (i.e., the directory in which the user is currently working) rather than from the root directory.
What is the command to change directory?
cd
What is the command to copy a file?
cp /location.xxx /destination.xxx
What command do you use to read the contents of a file?
cat
How do you display the calendar in linux?
cal
How can the manual for a particular linux command be accessed?
man cmd
Hopw do you create a text file in linux?
echo “text” dir/filename.txt
How do you delete a file in linux?
rm /dir/filename.xxx
How can you copy a file using the relative path?
cp ../../filename ../../dir/filename.xxx
how can you copy a file using absoloute path?
cp /dir/filename.xxx /dir/filename.xxx
What command do you use to move a file?
mv
What command removes a directory?
rmdir
What does adding -rf do to the remove file command?
r = recursive f=force.
How do you display the running processes in real time?
top
How do you display a snapshot of the running process?
ps
How do you display a snapshot of the running processes for the current user?
ps -u
Which command displays the current user name?
whoami
How do you display the list of commands that have been entered?
history
How do you kill a process?
kill [process id]
How do you quit the terminal?
exit
how do you display the list of users loggin in on the computer?
who or w