LINUX Flashcards
pwd
pwd : It prints the current directory
cd
cd :it changes directory
cd /…
cd /.. : change directory to an absolute path under the computer directory which is the main directory
cd ./…
change directory in the current directory
ls or l
It lists the contents of the directory in alphabetical order
ls -l
lists the contents in the long way aka more details (the user , the groupe, the date , the time, permissions …), ls -r It lists the contents in revrsed alphabetical order
ls -r
It lists the contents in revrsed alphabetical order
ls -p
lists contents with file types
ls -s
it lists contents sorted by directories/files size
sudo (Super User DO):
It allows you to make changes to files and perform administrative tasks for the current command
sudo !!
It means run the previous command with sudo,
sudo su
it takes you to the root user so you can avoid typing sudo for every command if you want to use it for multiple tasks
su (Switch User )
It allows you to change the user su …
apt-get
It installs a package or a program that already exists or preinstalled in the unbuntu repositories
sudo apt-get install vscode :
it installs the vscode application we use sudo because installation need administrative permission
apt-cache …
:It allows us to search for the program
apt-cache search vscode*
it searchs anything with the word vscode in it
apt-cache policy vsscode
it search for the installed program and it gives you its version and repositories
dpkg
it installs , builds and removes debian packages
dpkg -i chrome-stable.deb
: is used to install the chrome package
dpkg -l
: is used to list the installed packages
dpkg –contents chrome-stable.deb
it lists contents of a package
cat
It is used to list the contents of a file
cat > filename
creates a new file