Vous êtes sur la page 1sur 2

pwd- present working directory

ls - list
nick@ubuntu:~$
nick -username
~home directory
$-Guest
cd - change directory
cd .. - up(above directory in which it is contained/one level above directory)
clear-clear
mkdir - make directory
less- list the contents inside text file(can`t edit)
q to exit from less
cd / -root directory
locate - search and displays path of file
for locate directory must be updated
sudo updatedb - update database
nano - create or edit file
nano create
nano hw1.txt edit file
significance of colors on ubuntu
blue= folder or directory
light blue = protected folder
white = text file
^O= ctrl+O (save file-write out)
cd /
ls -l
cp "text file" "folder" -copy
cp hw1.txt hw1-backup.txt
mv hw1txt Homework(folder) - move
rmdir remove folder(if empty)
rm remove
nano can also run different program code files
chmod change modifiy character
chmod g+w
chmod u/g/o(u-user/g-group/o-other) u+w+r+x(write-read-execute)
chmod 777 name(2^2,2^1,2^0)
to make a file
cat > filename(can be used to write contents)
If access is denied change permissions chmod 777
ctrl+d to exit text editor
cat filename =to open file
grep searchword file
(search text in file)
grep -v hello abcd (hello will not appear in text)
grep -c hello abcd(how many times a word appear)
cd /dev
ls
sudo hexdump -C psaux
ctrl+c/z = to exit this code
sudo apt-get install cmatrix
cmatrix
fos(free open software)
sl(steam locomotive)

apt -get install sl


sl-l(smaller size)
sl -a(accident)
oneko(tom and jerry)
cowsay I love linux
cowsay -f dragon hello
how to print dragon in java
cowsay -less
cowsay -f gnu hello
fortune
fortune | cowsay -f dragon

Vous aimerez peut-être aussi